]> granicus.if.org Git - clang/log
clang
14 years agoDriver/Darwin/ld: Eliminate AddDarwinSubArch, our linker invocation is going to
Daniel Dunbar [Fri, 22 Jan 2010 02:04:52 +0000 (02:04 +0000)]
Driver/Darwin/ld: Eliminate AddDarwinSubArch, our linker invocation is going to
diverge from gcc anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94138 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a Coding Standards section to hacking.html, and point out that cstdio is forbidden.
Daniel Dunbar [Fri, 22 Jan 2010 02:04:46 +0000 (02:04 +0000)]
Add a Coding Standards section to hacking.html, and point out that cstdio is forbidden.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94137 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse raw_ostream instead of cstdio.
Daniel Dunbar [Fri, 22 Jan 2010 02:04:41 +0000 (02:04 +0000)]
Use raw_ostream instead of cstdio.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94136 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoVisit if, switch statements properly
Douglas Gregor [Fri, 22 Jan 2010 01:00:11 +0000 (01:00 +0000)]
Visit if, switch statements properly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94126 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach the cursor visitor to walk all of the C and Objective-C
Douglas Gregor [Fri, 22 Jan 2010 00:50:27 +0000 (00:50 +0000)]
Teach the cursor visitor to walk all of the C and Objective-C
declarations that have enough source information to make such a walk
useful. This includes walking into variable initializers and enum
constants, the types behind typedefs, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94124 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCreate function, block, and template parameters in the context of the
John McCall [Fri, 22 Jan 2010 00:28:27 +0000 (00:28 +0000)]
Create function, block, and template parameters in the context of the
translation unit.  This is temporary for function and block parameters;
template parameters can just stay this way, since Templates aren't
DeclContexts.  This gives us the nice property that everything created
in a record DC should have access in C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94122 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorevert my patch for rdar://7520940 that warns when a published header
Chris Lattner [Fri, 22 Jan 2010 00:14:44 +0000 (00:14 +0000)]
revert my patch for rdar://7520940 that warns when a published header
is #included with "foo.h" style syntax instead of framework syntax.
It produced too much noise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94120 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWire up the new range reporting for unreachable code.
Mike Stump [Thu, 21 Jan 2010 23:49:01 +0000 (23:49 +0000)]
Wire up the new range reporting for unreachable code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94118 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach the cursor visitor to walk statements and expressions, including
Douglas Gregor [Thu, 21 Jan 2010 23:27:09 +0000 (23:27 +0000)]
Teach the cursor visitor to walk statements and expressions, including
a few important subkinds. Now we're cookin' with gas!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94116 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove unreachable code warnings with respect to dead member and
Mike Stump [Thu, 21 Jan 2010 23:15:53 +0000 (23:15 +0000)]
Improve unreachable code warnings with respect to dead member and
dead array references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94115 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDue to local reversions and re-patching, I accidentally had multiple copies
John McCall [Thu, 21 Jan 2010 22:59:41 +0000 (22:59 +0000)]
Due to local reversions and re-patching, I accidentally had multiple copies
of the 'payload' in this header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94109 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove unreachable code warnings for with respect to dead functional casts in C++.
Mike Stump [Thu, 21 Jan 2010 22:12:18 +0000 (22:12 +0000)]
Improve unreachable code warnings for with respect to dead functional casts in C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94106 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach the cursor visitor to walk into typeof types (both kinds). This
Douglas Gregor [Thu, 21 Jan 2010 20:48:56 +0000 (20:48 +0000)]
Teach the cursor visitor to walk into typeof types (both kinds). This
is hard to test now; tests will come when we can walk stataements and
expressions properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94099 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove unreachable code warnings for with respect to c-style casts.
Mike Stump [Thu, 21 Jan 2010 19:51:34 +0000 (19:51 +0000)]
Improve unreachable code warnings for with respect to c-style casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94094 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove unreachable code warnings for with respect to ? :.
Mike Stump [Thu, 21 Jan 2010 19:44:04 +0000 (19:44 +0000)]
Improve unreachable code warnings for with respect to ? :.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94093 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAllocate the 'Protocols' array in ObjCInterfaceType and
Ted Kremenek [Thu, 21 Jan 2010 19:22:34 +0000 (19:22 +0000)]
Allocate the 'Protocols' array in ObjCInterfaceType and
ObjCObjectPointerType using the allocator associated with ASTContext.
Not only does this fix a memory leak, but it also makes these arrays
BumpPtrAllocated (in the typical case).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94090 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r94073, it fails in Release-Asserts builds.
Benjamin Kramer [Thu, 21 Jan 2010 18:14:21 +0000 (18:14 +0000)]
Revert r94073, it fails in Release-Asserts builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94089 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixes a comment.
Fariborz Jahanian [Thu, 21 Jan 2010 17:39:43 +0000 (17:39 +0000)]
Fixes a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94088 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPatch to implement rewriting of properties.
Fariborz Jahanian [Thu, 21 Jan 2010 17:36:00 +0000 (17:36 +0000)]
Patch to implement rewriting of properties.
Fixes radar 7562952.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94087 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove unreachable code warnings for with respect to compound
Mike Stump [Thu, 21 Jan 2010 17:31:41 +0000 (17:31 +0000)]
Improve unreachable code warnings for with respect to compound
assignments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94086 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach the cursor visitor to walk into a variety of different TypeLoc
Douglas Gregor [Thu, 21 Jan 2010 17:29:07 +0000 (17:29 +0000)]
Teach the cursor visitor to walk into a variety of different TypeLoc
kinds, so that we see referenced types, protocols, classes, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94085 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove unreachable code warnings with respect to dead binary and
Mike Stump [Thu, 21 Jan 2010 17:21:23 +0000 (17:21 +0000)]
Improve unreachable code warnings with respect to dead binary and
unary operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94084 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a test for clang_rt support on Darwin. With appropriate massaging, this
Daniel Dunbar [Thu, 21 Jan 2010 17:10:39 +0000 (17:10 +0000)]
Add a test for clang_rt support on Darwin. With appropriate massaging, this
checks that the runtime library can be linked and works for compiling on 10.6
for 10.{4,5,6} targets. Currently test is only for x86, and misses some
compiler-rt functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94083 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTweak OptionalTests paths.
Daniel Dunbar [Thu, 21 Jan 2010 17:09:39 +0000 (17:09 +0000)]
Tweak OptionalTests paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94082 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate to use llvm/utils/GetSourceVersion to detect version number, instead of
Daniel Dunbar [Thu, 21 Jan 2010 16:56:47 +0000 (16:56 +0000)]
Update to use llvm/utils/GetSourceVersion to detect version number, instead of
assuming SVN. This should be fixed to not necessarily be an integer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94081 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd utils/OptionalTests, a dumping ground for additional (lit) tests which for
Daniel Dunbar [Thu, 21 Jan 2010 16:55:39 +0000 (16:55 +0000)]
Add utils/OptionalTests, a dumping ground for additional (lit) tests which for
one reason or another don't belong in the regular test suite.

Inside is utils/OptionalTests/Extra which is specifically for tests that match
the layout of the regular tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94080 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the VTT related code into its own file, CGVTT.cpp
Anders Carlsson [Thu, 21 Jan 2010 16:50:45 +0000 (16:50 +0000)]
Move the VTT related code into its own file, CGVTT.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94079 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIntroduce type references into the C API, capturing references to
Douglas Gregor [Thu, 21 Jan 2010 16:28:34 +0000 (16:28 +0000)]
Introduce type references into the C API, capturing references to
typedefs only (for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94078 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach code-completion to deal with calls to functions without prototypes.
Douglas Gregor [Thu, 21 Jan 2010 15:46:19 +0000 (15:46 +0000)]
Teach code-completion to deal with calls to functions without prototypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94076 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSpeed up compilation by avoiding generating exceptional edges from
Mike Stump [Thu, 21 Jan 2010 15:20:48 +0000 (15:20 +0000)]
Speed up compilation by avoiding generating exceptional edges from
CallExprs as those edges help cause a n^2 explosion in the number of
destructor calls.  Other consumers, such as static analysis, that
would like to have more a more complete CFG can select the inclusion
of those edges as CFG build time.

This also fixes up the two compilation users of CFGs to be tolerant of
having or not having those edges.  All catch code is assumed be to
live if we didn't generate the exceptional edges for CallExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94074 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMatch branch labels with the trailing colon so we don't accidentally match something...
Benjamin Kramer [Thu, 21 Jan 2010 15:19:14 +0000 (15:19 +0000)]
Match branch labels with the trailing colon so we don't accidentally match something else.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94073 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove some recent checking code into SemaChecking instead.
Mike Stump [Thu, 21 Jan 2010 03:59:47 +0000 (03:59 +0000)]
Move some recent checking code into SemaChecking instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94067 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid instantiating std::sort to save on compiler size.
Mike Stump [Thu, 21 Jan 2010 03:43:13 +0000 (03:43 +0000)]
Avoid instantiating std::sort to save on compiler size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94065 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen checking for unreachable code, we can trivially avoid checking
Mike Stump [Thu, 21 Jan 2010 03:07:51 +0000 (03:07 +0000)]
When checking for unreachable code, we can trivially avoid checking
for unreachable loops if all the blocks are already marked live by
this point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94064 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen checking for unreachable blocks, we can trivially avoid extra
Mike Stump [Thu, 21 Jan 2010 02:55:37 +0000 (02:55 +0000)]
When checking for unreachable blocks, we can trivially avoid extra
work, if we know we already marked all blocks as live.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94063 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd infrastructure to add base initializers and member initializers to
Mike Stump [Thu, 21 Jan 2010 02:21:40 +0000 (02:21 +0000)]
Add infrastructure to add base initializers and member initializers to
the CFG.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94062 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixes comments.
Fariborz Jahanian [Thu, 21 Jan 2010 00:08:17 +0000 (00:08 +0000)]
Fixes comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94053 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAlso allow cast of block pointer type to
Fariborz Jahanian [Thu, 21 Jan 2010 00:05:09 +0000 (00:05 +0000)]
Also allow cast of block pointer type to
pointer to an any object. Another variation of
radar 7562285.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94052 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoStash a CXXUnit pointer into each cursor. This allows us to simplify
Douglas Gregor [Wed, 20 Jan 2010 23:57:43 +0000 (23:57 +0000)]
Stash a CXXUnit pointer into each cursor. This allows us to simplify
the interface to clang_visitChildren() by eliminating the
CXTranslationUnit pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94051 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago A Decl->getName() is not unique. However, the debug info descriptors
Devang Patel [Wed, 20 Jan 2010 23:56:40 +0000 (23:56 +0000)]
 A Decl->getName() is not unique. However, the debug info descriptors
 are uniqued. The debug info descriptor describing record's context is
necessary to keep two Decl's descriptor unique if their name match.

There is more work to do to create descriptors for DeclContext.
As a temp. step use type's name in FwdDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94050 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEliminate the MakeCXCursor routines that require their callers to know too much about...
Douglas Gregor [Wed, 20 Jan 2010 23:34:41 +0000 (23:34 +0000)]
Eliminate the MakeCXCursor routines that require their callers to know too much about the cursor's storage

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94049 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIn objective-c++ land, a block pointer is another object pointer.
Fariborz Jahanian [Wed, 20 Jan 2010 22:54:38 +0000 (22:54 +0000)]
In objective-c++ land, a block pointer is another object pointer.
So, casting a generic object pointer ('id' or 'Class') to the
block pointer is allowed. Fixes radar 7562285.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94045 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoYet more Doxygen-comment tweaking in the CIndex library.
Douglas Gregor [Wed, 20 Jan 2010 22:45:41 +0000 (22:45 +0000)]
Yet more Doxygen-comment tweaking in the CIndex library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94044 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove Doxygen documentation for the CIndex library, somewhat.
Douglas Gregor [Wed, 20 Jan 2010 22:28:27 +0000 (22:28 +0000)]
Improve Doxygen documentation for the CIndex library, somewhat.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94042 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange LLVM/clang #includes to use quotes, not angle-brackets. Just a think-o
John McCall [Wed, 20 Jan 2010 22:16:29 +0000 (22:16 +0000)]
Change LLVM/clang #includes to use quotes, not angle-brackets.  Just a think-o
prompted by the #include <iterator> above.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94040 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill CXEntity and CXDecl. The first has never been used, while the
Douglas Gregor [Wed, 20 Jan 2010 22:14:22 +0000 (22:14 +0000)]
Kill CXEntity and CXDecl. The first has never been used, while the
second has been wholly replaced by cursors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94039 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFirst pass at collecting access-specifier information along inheritance paths.
John McCall [Wed, 20 Jan 2010 21:53:11 +0000 (21:53 +0000)]
First pass at collecting access-specifier information along inheritance paths.
Triggers lots of assertions about missing access information;  fix them.

Will actually consume this information soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94038 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill some CXDecl-related APIs that have been superceded by
Douglas Gregor [Wed, 20 Jan 2010 21:45:58 +0000 (21:45 +0000)]
Kill some CXDecl-related APIs that have been superceded by
CXCursor-based APIs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94037 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill CXStmt. It isn't being used anywhere, and has no future.
Douglas Gregor [Wed, 20 Jan 2010 21:38:07 +0000 (21:38 +0000)]
Kill CXStmt. It isn't being used anywhere, and has no future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94036 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill clang_loadDeclaration() and clang_loadTranslationUnit().
Douglas Gregor [Wed, 20 Jan 2010 21:37:00 +0000 (21:37 +0000)]
Kill clang_loadDeclaration() and clang_loadTranslationUnit().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94034 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch c-index-test from clang_loadDeclaration() and
Douglas Gregor [Wed, 20 Jan 2010 21:32:04 +0000 (21:32 +0000)]
Switch c-index-test from clang_loadDeclaration() and
clang_loadTranslationUnit() over to clang_visitChildren().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94031 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch the internals of clang_loadTranslationUnit() over to the new
Douglas Gregor [Wed, 20 Jan 2010 21:13:59 +0000 (21:13 +0000)]
Switch the internals of clang_loadTranslationUnit() over to the new
cursor-based traversal, and eliminate TUVisitor. We're now down to one
visitor for traversing the AST. Yay!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94025 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse sizeof() instead of hard-coding a size for WrittenBuiltinSpecs, eek!
Daniel Dunbar [Wed, 20 Jan 2010 21:13:31 +0000 (21:13 +0000)]
Use sizeof() instead of hard-coding a size for WrittenBuiltinSpecs, eek!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94024 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIntroduce a new, cursor-based traversal function that visits the
Douglas Gregor [Wed, 20 Jan 2010 20:59:29 +0000 (20:59 +0000)]
Introduce a new, cursor-based traversal function that visits the
children of a given cursor, regardless of what kind of cursor it
is. This is a generalization of clang_loadDeclaration and
clang_loadTranslationUnit that will also extent to statements,
expressions, etc.

As proof-of-concept, switched clang_loadDeclaration() from its own
visitor over to an instance of this traversal function internally.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94022 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSettled rule on warning on unimplemented property in
Fariborz Jahanian [Wed, 20 Jan 2010 19:36:21 +0000 (19:36 +0000)]
Settled rule on warning on unimplemented property in
category implementation when some implementations
are missing in the primary class implementation.
(fixes radar 6505200).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94014 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreduce redundant are's
Chris Lattner [Wed, 20 Jan 2010 17:53:58 +0000 (17:53 +0000)]
reduce redundant are's

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94009 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove performance of warning when not implementing a required
Fariborz Jahanian [Wed, 20 Jan 2010 17:27:59 +0000 (17:27 +0000)]
Improve performance of warning when not implementing a required
property of a protocol (my previous patch). No change in functionality.
(radar 7544809).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94005 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake some helper functions static.
Benjamin Kramer [Wed, 20 Jan 2010 16:21:40 +0000 (16:21 +0000)]
Make some helper functions static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94004 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't store a Twine temporary, it's unsafe.
Benjamin Kramer [Wed, 20 Jan 2010 16:18:11 +0000 (16:18 +0000)]
Don't store a Twine temporary, it's unsafe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94003 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix html glitch. Pointed out by clwi (PR6090).
Duncan Sands [Wed, 20 Jan 2010 12:40:56 +0000 (12:40 +0000)]
Fix html glitch.  Pointed out by clwi (PR6090).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94000 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCorrect comments.
Zhongxing Xu [Wed, 20 Jan 2010 07:57:45 +0000 (07:57 +0000)]
Correct comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93999 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoallow this test to pass, even with the recent .s printer changes.
Chris Lattner [Wed, 20 Jan 2010 07:45:09 +0000 (07:45 +0000)]
allow this test to pass, even with the recent .s printer changes.
Have I ever mentioned that clang regtests should not be grepping .s files??

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93998 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a typo pointed about by gabor.
Chandler Carruth [Wed, 20 Jan 2010 07:43:54 +0000 (07:43 +0000)]
Fix a typo pointed about by gabor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93997 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the MacroBuilder utilitiy to its own header. Update references.
Chandler Carruth [Wed, 20 Jan 2010 06:13:02 +0000 (06:13 +0000)]
Move the MacroBuilder utilitiy to its own header. Update references.

Comments and/or improvements to the documentation are welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93982 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix an invalid Twine use spotty by abbeyj, it isn't safe to use Twine
Daniel Dunbar [Wed, 20 Jan 2010 06:09:53 +0000 (06:09 +0000)]
Fix an invalid Twine use spotty by abbeyj, it isn't safe to use Twine
temporaries (this is one reason I'm nervous about propagating their use beyond
particularly performance critical places).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93981 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoActually remove the include that r93974 made unnecessary.
Chandler Carruth [Wed, 20 Jan 2010 04:09:11 +0000 (04:09 +0000)]
Actually remove the include that r93974 made unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93975 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a layering issue between Basic and FE by moving a utility class into Basic.
Chandler Carruth [Wed, 20 Jan 2010 03:59:11 +0000 (03:59 +0000)]
Fix a layering issue between Basic and FE by moving a utility class into Basic.

This isn't entirely satisfactory, as it seems an implementation detail, and
with nothing to do with TargetInfo. Suggestions on where to put this are
welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93974 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a missing case for DeclContext printer.
Zhongxing Xu [Wed, 20 Jan 2010 03:21:28 +0000 (03:21 +0000)]
Add a missing case for DeclContext printer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93973 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Lift clang resource directory computation to the Driver object.
Daniel Dunbar [Wed, 20 Jan 2010 02:35:16 +0000 (02:35 +0000)]
Driver: Lift clang resource directory computation to the Driver object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93971 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoclang/Darwin: Update for rename of 10.4 static runtime library.
Daniel Dunbar [Wed, 20 Jan 2010 02:35:02 +0000 (02:35 +0000)]
clang/Darwin: Update for rename of 10.4 static runtime library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93970 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAlso handle CXXConstructor, CXXDestructor and CXXConversion in CFG
Mike Stump [Wed, 20 Jan 2010 02:28:05 +0000 (02:28 +0000)]
Also handle CXXConstructor, CXXDestructor and CXXConversion in CFG
printing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93968 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse the llvm coding convention for indentation for switch.
Mike Stump [Wed, 20 Jan 2010 02:03:14 +0000 (02:03 +0000)]
Use the llvm coding convention for indentation for switch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93966 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPatch to implement required warnings for unimplemented
Fariborz Jahanian [Wed, 20 Jan 2010 01:51:55 +0000 (01:51 +0000)]
Patch to implement required warnings for unimplemented
properties imported frfom protocol. Fixes radar 7544809.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93965 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake UnresolvedSet.h standalone.
John McCall [Wed, 20 Jan 2010 01:36:13 +0000 (01:36 +0000)]
Make UnresolvedSet.h standalone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93964 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWire up the EH context for the catch clauses to the outer EH context. WIP.
Mike Stump [Wed, 20 Jan 2010 01:30:58 +0000 (01:30 +0000)]
Wire up the EH context for the catch clauses to the outer EH context.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93963 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an exceptional edge from the try terminated block to the outer EH
Mike Stump [Wed, 20 Jan 2010 01:15:34 +0000 (01:15 +0000)]
Add an exceptional edge from the try terminated block to the outer EH
context (try or the Exit block) when there isn't a catch (...).

Improve CFG printing for catch (...).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93962 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAttempt to improve CIndex Doxygen organization, although I can't actually test this...
Douglas Gregor [Wed, 20 Jan 2010 01:10:47 +0000 (01:10 +0000)]
Attempt to improve CIndex Doxygen organization, although I can't actually test this locally

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93961 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGive UnresolvedSet the ability to store access specifiers for each declaration.
John McCall [Wed, 20 Jan 2010 00:46:10 +0000 (00:46 +0000)]
Give UnresolvedSet the ability to store access specifiers for each declaration.
Change LookupResult to use UnresolvedSet.  Also extract UnresolvedSet into its
own header and make it templated over an inline capacity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93959 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove some #if 0'd code that's never going to get used.
Douglas Gregor [Wed, 20 Jan 2010 00:34:08 +0000 (00:34 +0000)]
Remove some #if 0'd code that's never going to get used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93957 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove CheckFallThrough analysis in the presense of the new C++ EH
Mike Stump [Wed, 20 Jan 2010 00:34:04 +0000 (00:34 +0000)]
Improve CheckFallThrough analysis in the presense of the new C++ EH
support.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93956 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,
Douglas Gregor [Wed, 20 Jan 2010 00:26:57 +0000 (00:26 +0000)]
Kill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,
clang_getDeclSource, and clang_getDeclSourceFile; the cursor
equivalents are the way of the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93955 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIntroduce a special cursor kind for the translation unit, to serve as
Douglas Gregor [Wed, 20 Jan 2010 00:23:15 +0000 (00:23 +0000)]
Introduce a special cursor kind for the translation unit, to serve as
the root of the conceptual cursor hierarchy (just like we do with
declarations). This will be used when we get to unify
clang_loadTranslationUnit() and clang_loadDeclaration() into something
more generally useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93954 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCXCursor_UnexposedDecl to the first declaration kind
Douglas Gregor [Wed, 20 Jan 2010 00:07:45 +0000 (00:07 +0000)]
CXCursor_UnexposedDecl to the first declaration kind

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93952 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd support for Fedora 10 x86_64, there really should be a better way to handle this.
Chris Lattner [Tue, 19 Jan 2010 23:30:00 +0000 (23:30 +0000)]
add support for Fedora 10 x86_64, there really should be a better way to handle this.
patch by Dmitry

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93948 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,
Douglas Gregor [Tue, 19 Jan 2010 23:25:01 +0000 (23:25 +0000)]
Kill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,
and CXCursor_EnumConstantRef; they've been subsumed by expression
references, which do a much nicer job.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93947 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExtend the CIndex API with direct support for expressions and
Douglas Gregor [Tue, 19 Jan 2010 23:20:36 +0000 (23:20 +0000)]
Extend the CIndex API with direct support for expressions and
statements, moving some of the more unnatural kinds of references
(VarRef, EnumConstantRef, etc.) over to the expressions. We can now
poke at arbitrary expressions and statements with, e.g.,
clang_getCursor() and get back useful information (e.g., source
ranges).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93946 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement goto inside of blocks.
Mike Stump [Tue, 19 Jan 2010 23:08:01 +0000 (23:08 +0000)]
Implement goto inside of blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93945 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate and move around comments.
Eric Christopher [Tue, 19 Jan 2010 22:58:35 +0000 (22:58 +0000)]
Update and move around comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93942 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe type of a compound literal expression is not necessarily the same as the
John McCall [Tue, 19 Jan 2010 22:33:45 +0000 (22:33 +0000)]
The type of a compound literal expression is not necessarily the same as the
type which was syntactically written.  Fixes PR 6080.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93933 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill the unused and unnecessary CXCursor_MemberRef, twin to the
Douglas Gregor [Tue, 19 Jan 2010 22:15:34 +0000 (22:15 +0000)]
Kill the unused and unnecessary CXCursor_MemberRef, twin to the
now-dead CXCursor_ObjCIvarRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93928 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill CXCursor_ObjCIvarRef. Such cursors could never be created, and
Douglas Gregor [Tue, 19 Jan 2010 22:11:32 +0000 (22:11 +0000)]
Kill CXCursor_ObjCIvarRef. Such cursors could never be created, and
have been marked for death for a while.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93927 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIntroduce the notion of an "unexposed" declaration into the CIndex
Douglas Gregor [Tue, 19 Jan 2010 22:07:56 +0000 (22:07 +0000)]
Introduce the notion of an "unexposed" declaration into the CIndex
API. This is a catch-all for any declaration known to Clang but not
specifically part of the CIndex API. We'll use the same approach with
expressions, statements, references, etc., as needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93924 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd CFG support for the start and end of scopes and infrastructure for
Mike Stump [Tue, 19 Jan 2010 22:00:14 +0000 (22:00 +0000)]
Add CFG support for the start and end of scopes and infrastructure for
implicit destructor calls.  WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93922 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRewriteing of gnu extension __typeof in objective-c rewriter.
Fariborz Jahanian [Tue, 19 Jan 2010 21:48:35 +0000 (21:48 +0000)]
Rewriteing of gnu extension __typeof in objective-c rewriter.
Fixes radar 6358225.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93917 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRework the CXSourceLocation and CXSourceRange APIs. They are now
Douglas Gregor [Tue, 19 Jan 2010 21:36:55 +0000 (21:36 +0000)]
Rework the CXSourceLocation and CXSourceRange APIs. They are now
opaque data structures accessed through the new functions
clang_getInstantiationLocation(), clang_getRangeStart(), and
clang_getRangeEnd(). The new API permits later extensions to introduce
new functions to allow CIndex clients to walk macro instantiations, if
we ever care.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93915 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't try to build/install/clean compiler-rt stuff if it isn't in the projects directory.
Daniel Dunbar [Tue, 19 Jan 2010 21:28:04 +0000 (21:28 +0000)]
Don't try to build/install/clean compiler-rt stuff if it isn't in the projects directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93914 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInitial cut at integrating compiler-rt (on Darwin) w/ clang build.
Daniel Dunbar [Tue, 19 Jan 2010 21:12:58 +0000 (21:12 +0000)]
Initial cut at integrating compiler-rt (on Darwin) w/ clang build.
 - compiler-rt should be checked out into $LLVM_SRC_ROOT/projects/compiler-rt.

 - On Darwin, this will automatically build the runtime libraries clang needs
   into $OBJROOT/lib/clang/<version>/darwin/...

 - The mechanism can easily support other platforms, and can eventually support
   multiple platforms once clang has some kind of configure process (for
   specifying the desired targets).

 - Feedback on the approach is welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93910 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTighten code and rework indentation of some if() branches (for readability). No...
Ted Kremenek [Tue, 19 Jan 2010 20:52:05 +0000 (20:52 +0000)]
Tighten code and rework indentation of some if() branches (for readability).  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93904 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove extra space in uses of 'assert()'.
Ted Kremenek [Tue, 19 Jan 2010 20:46:35 +0000 (20:46 +0000)]
Remove extra space in uses of 'assert()'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93903 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-alphabetize cases in switch statement.
Ted Kremenek [Tue, 19 Jan 2010 20:40:33 +0000 (20:40 +0000)]
Re-alphabetize cases in switch statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93902 91177308-0d34-0410-b5e6-96231b3b80d8