removes the copy. Patch from Eelis van der Weegen, tweaked/updated by
me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111807
91177308-0d34-0410-b5e6-
96231b3b80d8
if (isInvalid) {
assert(PrevSpec && "Method did not return previous specifier!");
assert(DiagID);
- Diag(Tok, DiagID) << PrevSpec;
+
+ if (DiagID == diag::ext_duplicate_declspec)
+ Diag(Tok, DiagID)
+ << PrevSpec << FixItHint::CreateRemoval(Tok.getLocation());
+ else
+ Diag(Tok, DiagID) << PrevSpec;
}
DS.SetRangeEnd(Tok.getLocation());
ConsumeToken();
int x = y ? 1 4+foobar;
return x;
}
+
+// CHECK: typedef int int_t;
+typedef typedef int int_t;