aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/file.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-01-12 10:28:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-01-12 10:28:29 +0200
commite21f9ae1a3e36160259a449e06ff52692e58b28c (patch)
tree6bbc40255704212d5fabba94afba6d02157657e6 /libbuild2/file.cxx
parent3740ef0a57116e35445379b8cc31868718729889 (diff)
Diagnose typed and project-qualified empty names
Diffstat (limited to 'libbuild2/file.cxx')
-rw-r--r--libbuild2/file.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx
index 396b0fe..5d1487f 100644
--- a/libbuild2/file.cxx
+++ b/libbuild2/file.cxx
@@ -2549,6 +2549,11 @@ namespace build2
context& ctx (base.ctx);
assert (ctx.phase == run_phase::load);
+ // Validate the name.
+ //
+ if (tgt.qualified () && tgt.empty ())
+ fail (loc) << "project-qualified empty name " << tgt;
+
// If metadata is requested, delegate to import_direct() which will lookup
// the target and verify the metadata was loaded.
//