Index: llvm/trunk/lib/MC/MCParser/AsmParser.cpp =================================================================== --- llvm/trunk/lib/MC/MCParser/AsmParser.cpp +++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp @@ -1103,7 +1103,7 @@ // This is a symbol reference. StringRef SymbolName = Identifier; if (SymbolName.empty()) - return true; + return Error(getLexer().getLoc(), "expected a symbol reference"); MCSymbolRefExpr::VariantKind Variant = MCSymbolRefExpr::VK_None; Index: llvm/trunk/test/MC/AArch64/expr-bad-symbol.s =================================================================== --- llvm/trunk/test/MC/AArch64/expr-bad-symbol.s +++ llvm/trunk/test/MC/AArch64/expr-bad-symbol.s @@ -0,0 +1,6 @@ +// RUN: not llvm-mc -triple aarch64-- %s 2>&1 | FileCheck %s + + .text +_foo: + str q28, [x0, #1*6*4*@] +// CHECK: error: expected a symbol reference