| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
typedef int f();
struct S {
f *x; // incorrectly assuming this is function decl, leading to failed assertions.
};
llvm-svn: 57598
|
|
|
|
|
|
| |
Also added serialization support to OverloadExpr.
llvm-svn: 57588
|
|
|
|
| |
llvm-svn: 57563
|
|
|
|
|
|
| |
the preincrement is a subexpression, e.g. foo(++x); This can cause false negatives, but will remove a whole class of false positives.
llvm-svn: 57554
|
|
|
|
|
|
|
| |
Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl.
Cleans up the code a bit and better reflects that Decl class structure.
llvm-svn: 57541
|
|
|
|
|
|
| |
Note: One day, we should consider moving the actual diags to ObjCQualifiedIdTypesAreCompatible(), since it has more information on the actual problem. GCC currently emits slightly more instructive errors for some cases involving protocols. I added a FIXME to the code.
llvm-svn: 57529
|
|
|
|
| |
llvm-svn: 57514
|
|
|
|
| |
llvm-svn: 57511
|
|
|
|
| |
llvm-svn: 57502
|
|
|
|
| |
llvm-svn: 57501
|
|
|
|
|
|
| |
on non-float types.
llvm-svn: 57477
|
|
|
|
|
|
|
|
|
|
|
| |
- Follows the MSVC (original) implementation, including support of
pack(show) (useful for testing).
- Implements support for named pack records which gcc seems to
ignore (or implements incorrectly).
- Not currently wired to anything, only functionality change is the
type checking of the pragma.
llvm-svn: 57476
|
|
|
|
|
|
|
|
| |
- Currently still lives in CGCall.cpp but is intended to be the
target specific place for hooking ABI information.
- Select ABIInfo to use based on Target's prefix and pointer width.
llvm-svn: 57445
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 57417
|
|
|
|
|
|
|
|
| |
When the static type on the Decl side is a subclass of DeclContext the compiler will use a "inlinable" static_cast, instead of always using an out-of-line function call.
Note, though, that the isa<> check still uses an out-of-line function call.
llvm-svn: 57415
|
|
|
|
|
|
|
| |
wraps comments in <i> tags. Extend rewrite tokens to support
this minimal functionality.
llvm-svn: 57409
|
|
|
|
|
|
| |
and lets a client iterate over it.
llvm-svn: 57407
|
|
|
|
|
|
|
| |
were setting a kind and then forming it. This is just a minor API cleanup,
no functionality change.
llvm-svn: 57404
|
|
|
|
|
|
| |
unterminated.
llvm-svn: 57403
|
|
|
|
|
|
| |
keep comment mode, instead of returning false. This matches SkipWhitespace.
llvm-svn: 57402
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
even whitespace, as tokens from the file. This is enabled with
L->SetKeepWhitespaceMode(true) on a raw lexer. In this mode, you too
can use clang as a really complex version of 'cat' with code like this:
Lexer RawLex(SourceLocation::getFileLoc(SM.getMainFileID(), 0),
PP.getLangOptions(), File.first, File.second);
RawLex.SetKeepWhitespaceMode(true);
Token RawTok;
RawLex.LexFromRawLexer(RawTok);
while (RawTok.isNot(tok::eof)) {
std::cout << PP.getSpelling(RawTok);
RawLex.LexFromRawLexer(RawTok);
}
This will emit exactly the input file, with no canonicalization or other
translation. Realistic clients actually do something with the tokens of
course :)
llvm-svn: 57401
|
|
|
|
| |
llvm-svn: 57399
|
|
|
|
| |
llvm-svn: 57398
|
|
|
|
|
|
| |
ivar.
llvm-svn: 57397
|
|
|
|
| |
llvm-svn: 57396
|
|
|
|
|
|
|
|
| |
same we we do an unterminated string or character literal. This makes
it so we can guarantee that the lexer never calls into the
preprocessor (which would be suicide for a raw lexer).
llvm-svn: 57395
|
|
|
|
| |
llvm-svn: 57394
|
|
|
|
|
|
|
|
|
|
|
| |
using LexRawToken, create one and use LexFromRawLexer. This avoids
twiddling the RawLexer flag around and simplifies some code (even
speeding raw lexing up a tiny bit).
This change also improves the token paster to use a Lexer on the stack
instead of new/deleting it.
llvm-svn: 57393
|
|
|
|
| |
llvm-svn: 57392
|
|
|
|
| |
llvm-svn: 57391
|
|
|
|
| |
llvm-svn: 57390
|
|
|
|
| |
llvm-svn: 57389
|
|
|
|
|
|
| |
unfortunately a largish/complex diff, however it was necessry to pass all the current block tests.
llvm-svn: 57337
|
|
|
|
| |
llvm-svn: 57335
|
|
|
|
| |
llvm-svn: 57332
|
|
|
|
| |
llvm-svn: 57317
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
class C {
static const int number = 50;
static int arr[number];
};
Here's how it worked:
-GetTypeForDeclarator was called from both Sema::ActOnCXXMemberDeclarator and Sema::ActOnDeclarator.
-VariableArrayTypes are not uniqued so two VariableArrayTypes were created with the same DeclRefExpr.
-On exit they both tried to destroy that one DeclRefExpr.
The fix is not to use GetTypeForDeclarator from the Sema::ActOnCXXMemberDeclarator.
llvm-svn: 57313
|
|
|
|
|
|
|
|
| |
DeclContext.
This required changes to attach the compound statement later on (like we do for functions).
llvm-svn: 57304
|
|
|
|
|
|
|
|
|
|
| |
- Modify BlockExpr to reference the BlockDecl.
This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?).
Still some follow-up work to finish this (forthcoming).
llvm-svn: 57298
|
|
|
|
|
|
| |
things are simplified: no heap shape assumption, no parameter alias assumption, etc.
llvm-svn: 57285
|
|
|
|
|
|
| |
commit actually introduced a regression, not fixed a bug.
llvm-svn: 57282
|
|
|
|
|
|
|
|
| |
ScopedDecl*.
This also removes the ugly hack needed in CFG.cpp for subclassing DeclStmt to create a DeclStmt with one Decl*.
llvm-svn: 57275
|
|
|
|
| |
llvm-svn: 57274
|
|
|
|
|
|
| |
SizeOfAlignOfTypeExpr. This bug was unmasked by recent changes to StmtIterator.
llvm-svn: 57273
|
|
|
|
|
|
| |
Serialization for OwningDeclGroupRefs now works.
llvm-svn: 57272
|
|
|
|
| |
llvm-svn: 57271
|
|
|
|
|
|
|
|
|
| |
setGroupingParens call after the ')' is parsed.
Fixes this bug:
int (x)(0); // error, expected function declarator where the '(0)' initializer is
llvm-svn: 57241
|
|
|
|
| |
llvm-svn: 57240
|
|
|
|
| |
llvm-svn: 57225
|
|
|
|
| |
llvm-svn: 57222
|