diff options
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 9d6601af328..a70e3917214 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1821,7 +1821,8 @@ ExprResult Sema::ActOnIdExpression(Scope *S, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, - CorrectionCandidateCallback *CCC) { + CorrectionCandidateCallback *CCC, + bool IsInlineAsmIdentifier) { assert(!(IsAddressOfOperand && HasTrailingLParen) && "cannot be direct & operand and have a trailing lparen"); @@ -1937,6 +1938,10 @@ ExprResult Sema::ActOnIdExpression(Scope *S, IsAddressOfOperand, TemplateArgs); } + // Don't diagnose an empty lookup for inline assmebly. + if (IsInlineAsmIdentifier) + return ExprError(); + CorrectionCandidateCallback DefaultValidator; if (DiagnoseEmptyLookup(S, SS, R, CCC ? *CCC : DefaultValidator)) return ExprError(); |