| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Patch by David Chisnall!
llvm-svn: 52586
|
|
|
|
|
|
| |
Patch by David Chisnall!
llvm-svn: 52422
|
|
|
|
|
|
|
|
|
|
|
| |
isn't guaranteed to exist. This fixes a crash with conflicting typedefs
coming from stdin.
This also fixes the crash in PR2406, but doesn't completely fix the
issue; it appears there's something strange about the physical location
for the definition of int64_t in stdlib.h.
llvm-svn: 52209
|
|
|
|
|
|
|
| |
-ScopedDecls get chained to their DeclContext.
-DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList.
llvm-svn: 52164
|
|
|
|
|
|
|
|
|
| |
Added TagKind enum.
Added getTagKind() method.
Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.
llvm-svn: 52160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pointer cast hack currently in isIntegerConstantExpr
(in lib/AST/Expr.cpp). Also removes an odd test that even gcc doesn't accept.
The reason the pointer cast hack is relevant here is that it makes Sema
end up misinterpreting the relevant expression as a null pointer constant.
The reason for this patch is that I plan to remove the pointer cast hack
sometime soon because it causes strange issues, especially in its
current form; see my recent email to cfe-dev
"[PATCH] add constant expression evaluation to the AST and fix PR2413".
llvm-svn: 52120
|
|
|
|
| |
llvm-svn: 52092
|
|
|
|
| |
llvm-svn: 52054
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
moves the check for the invalid construct to a point where it doesn't
affect other uses of isIntegerConstantExpr, and we can warn properly
when the extension is used. This makes it a bit more complicated, but
it's a lot cleaner.
Steve, please tell me if this check is sufficient to handle the
relevant system header. I know it's enough to handle the testcase, but
I don't know what exactly the original looks like.
llvm-svn: 51918
|
|
|
|
|
|
| |
this plugs the leak of attributes and also fixes a crash in the test
llvm-svn: 51862
|
|
|
|
|
|
|
|
|
|
| |
required by the standard (the standard doesn't know anything about
implicit casts).
Disallow pointers cast to non-integral arithmetic types as constant
expressions. This was previously allowed by accident.
llvm-svn: 51779
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
encountered. Mixing up the decls is unintuitive, and confuses the AST
destruction code. Fixes PR2360.
Note that there is a need to look up the characteristics and
declarations of a function associated with a particular name or decl,
but the original swapping code doesn't solve it properly.
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html is one
suggestion for how to fix that.
llvm-svn: 51584
|
|
|
|
|
|
|
|
|
|
| |
it fixes PR2204. Not too much to say about the implementation; it works
in a similar way to the vector size attribute.
At some point, we need to modify the targets to provide information
about the appropriate types.
llvm-svn: 51577
|
|
|
|
|
|
|
|
|
| |
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=51498&r1=51497&r2=51498&view=diff
Turns out that there are multiple places where a redefinition diagnostic can be emitted. A cleaner solution (without touching Sema) is to have
the Driver turn off these diagnostics. (will submit this patch soon)
llvm-svn: 51502
|
|
|
|
| |
llvm-svn: 51498
|
|
|
|
|
|
| |
void f(const void) in one place and rejecting it in another.
llvm-svn: 51424
|
|
|
|
|
|
|
|
|
| |
lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to
use its own enum for visibility types instead of using
llvm::GlobalValue::VisibilityTypes. These changes eliminate
dependencies in the AST library on LLVM's VMCore library.
llvm-svn: 51398
|
|
|
|
| |
llvm-svn: 51361
|
|
|
|
| |
llvm-svn: 51326
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in Sema, per discussion on mailing list. This doesn't cause any changes
in the test results. I'll probably add some more tests at some point,
but it's an open question what we need to accept to be compatible with
real code.
This doesn't touch the existing isConstantExpr method on Expr; that
should be addressed somehow eventually (either removed or refined to
whatever is appropriate).
llvm-svn: 51318
|
|
|
|
|
|
| |
it a few days to make sure there aren't any significant regressions.
llvm-svn: 51273
|
|
|
|
|
|
|
|
| |
errors when parsing AppKit that gcc does not.
Teach Sema::MergeVarDecl() about __private_extern__.
llvm-svn: 51005
|
|
|
|
|
|
|
| |
-identifierResolver exposes an iterator interface to get all decls through the scope chain.
-The semantic staff (checking IdentifierNamespace and Doug's checking for shadowed tags were moved out of IdentifierResolver and back into Sema. IdentifierResolver just gives an iterator for all reachable decls of an identifier.
llvm-svn: 50923
|
|
|
|
| |
llvm-svn: 50906
|
|
|
|
| |
llvm-svn: 50903
|
|
|
|
| |
llvm-svn: 50885
|
|
|
|
|
|
|
| |
Still need to iron out some of the semantics (fixmes are present).
This addresses <rdar://problem/5916348>
llvm-svn: 50866
|
|
|
|
| |
llvm-svn: 50799
|
|
|
|
|
|
| |
params not getting installed for builtins when synthesized.
llvm-svn: 50676
|
|
|
|
| |
llvm-svn: 50672
|
|
|
|
|
|
|
| |
(InitListChecker) that synthesizes implicit InitListExpr's when appropriate (see InitListExpr comments in Expr.h for more details). I also moved the code to SemaInit.cpp, to help reduce clutter in SemaDecl.cpp.
NOTE: This work is incomplete and still fails many tests (as a result, it isn't enabled yet). Nevertheless, I wanted to check it in so I can work on it from home.
llvm-svn: 50544
|
|
|
|
|
|
|
|
| |
where they appeared, causing the bug: http://llvm.org/bugs/show_bug.cgi?id=2266.
Fix it by making implicitly defined functions get the DeclContext of translation unit.
llvm-svn: 50538
|
|
|
|
| |
llvm-svn: 50484
|
|
|
|
|
|
|
|
|
| |
-NamespaceDecl for the AST
-Checks for name clashes between namespaces and tag/normal declarations.
This commit doesn't implement proper name lookup for namespaces.
llvm-svn: 50321
|
|
|
|
|
|
| |
comments on the ML will follow
llvm-svn: 50262
|
|
|
|
|
|
|
|
|
|
|
| |
DeclContext *CtxDecl -> DeclContext *DeclCtx
DeclContext *CD -> DeclContext *DC
It makes the code more consistent."
Patch by Zhongxing Xu!
llvm-svn: 50105
|
|
|
|
| |
llvm-svn: 50021
|
|
|
|
| |
llvm-svn: 49942
|
|
|
|
| |
llvm-svn: 49938
|
|
|
|
| |
llvm-svn: 49856
|
|
|
|
|
|
|
|
| |
-Added TranslationUnitDecl class to serve as top declaration context
-ASTContext gets a TUDecl member and a getTranslationUnitDecl() function
-All ScopedDecls get the TUDecl as DeclContext when declared at global scope
llvm-svn: 49855
|
|
|
|
|
|
|
|
| |
VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().
This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).
llvm-svn: 49748
|
|
|
|
|
|
| |
in C++
llvm-svn: 49621
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allows the parsing of "class" in addition to "struct" and "union" to
declare a record. So this patch allows:
class C { };
class C c1;
But it does not contain the lookup bits, so this won't work yet:
C c2;
Patch by Doug Gregor!
llvm-svn: 49613
|
|
|
|
|
|
| |
IdResolver and the Scope.
llvm-svn: 49567
|
|
|
|
| |
llvm-svn: 49539
|
|
|
|
|
|
|
| |
shadowing, instead of threading it through the AST. This patch contributed
by Argiris Kirtzidis!
llvm-svn: 49520
|
|
|
|
|
|
|
|
| |
1) objc ivar processing is split out of ActOnField into its own ActOnIvar method.
2) the new objc ivar action takes visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.
llvm-svn: 49506
|
|
|
|
|
|
|
|
| |
void f(T);
is only invalid in C++ mode, not C89 mode.
llvm-svn: 49460
|
|
|
|
|
|
| |
argument handling. I'll fix up the c89 (void) thing next.
llvm-svn: 49459
|