Don't accept '$' in identifiers in assembler-with-cpp mode.
llvm-svn: 67013
This commit is contained in:
parent
0422efc994
commit
36a3e92521
|
@ -644,7 +644,9 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK,
|
|||
if (!Options.ObjC1 && LangStd < lang_gnu_START)
|
||||
Options.Blocks = 0;
|
||||
|
||||
Options.DollarIdents = 1; // FIXME: Really a target property.
|
||||
// Never accept '$' in identifiers when preprocessing assembler.
|
||||
if (LK != langkind_asm_cpp)
|
||||
Options.DollarIdents = 1; // FIXME: Really a target property.
|
||||
if (PascalStrings.getPosition())
|
||||
Options.PascalStrings = PascalStrings;
|
||||
Options.Microsoft = MSExtensions;
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// RUN: clang -dump-tokens %s &> %t &&
|
||||
// RUN: grep "identifier '\$A'" %t
|
||||
// RUN: clang -dump-tokens -x assembler-with-cpp %s &> %t &&
|
||||
// RUN: grep "identifier 'A'" %t
|
||||
// PR3808
|
||||
|
||||
$A
|
Loading…
Reference in New Issue