Summary:
Without this, we would not consume the closing brace which would cause
the parser to start consuming C++ and bad things would happen.
Reviewers: majnemer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4505
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213032
91177308-0d34-0410-b5e6-
96231b3b80d8
SmallVector<Token, 4> AsmToks;
unsigned BraceNesting = 0;
- unsigned short savedBraceCount = 0;
+ unsigned short savedBraceCount = BraceCount;
bool InAsmComment = false;
FileID FID;
unsigned LineNo = 0;
if (Tok.is(tok::l_brace)) {
// Braced inline asm: consume the opening brace.
BraceNesting = 1;
- savedBraceCount = BraceCount;
EndLoc = ConsumeBrace();
LBraceLocs.push_back(EndLoc);
++NumTokensRead;
}
}
}
+void t11() {
+ do { __asm mov eax, 0 __asm { __asm mov edx, 1 } } while(0);
+}
int t_fail() { // expected-note {{to match this}}
__asm
__asm { // expected-error 3 {{expected}} expected-note {{to match this}}