From e21f9ae1a3e36160259a449e06ff52692e58b28c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 12 Jan 2021 10:28:29 +0200 Subject: Diagnose typed and project-qualified empty names --- libbuild2/file.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libbuild2/file.cxx') 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. // -- cgit v1.1