]>
granicus.if.org Git - clang/log
David Chisnall [Sat, 23 Jan 2010 02:40:42 +0000 (02:40 +0000)]
Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 23 Jan 2010 02:11:34 +0000 (02:11 +0000)]
Rename getClangFullVendorVersion() to getClangFullVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94273
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 23 Jan 2010 00:46:32 +0000 (00:46 +0000)]
Implement elementary access control.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 23 Jan 2010 00:40:08 +0000 (00:40 +0000)]
Teach the cursor visitor to recurse into the type information of
explicit casts, sizeof, alignof, and compound literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 23 Jan 2010 00:26:38 +0000 (00:26 +0000)]
Extern darwin-clang_rt.c test to also test targetting ARM ({armv6, armv7} x
{thumb,no-thumb}).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94264
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 23 Jan 2010 00:26:29 +0000 (00:26 +0000)]
Fix a FIXME, this test folds to a constant now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 23 Jan 2010 00:14:00 +0000 (00:14 +0000)]
Extend clang_createTranslationUnitFromSourceFile() to support creating
translation units that include unsaved files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 23:04:44 +0000 (23:04 +0000)]
outside a method, 'super' should resolve in a normal name look up
to mimic gcc's behavior. Fixes radar
7400691 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 22:44:15 +0000 (22:44 +0000)]
Add 'clang_getClangVersion()' function to CIndex. This exposes the full Clang version string through the CIndex API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94242
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 22:37:17 +0000 (22:37 +0000)]
Fixup the rest of the testcases to grep the .ll file instead of the .s
file, and add FIXMEs to the remaining broken tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 22:30:25 +0000 (22:30 +0000)]
Fixes test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 22:29:50 +0000 (22:29 +0000)]
Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 22:29:16 +0000 (22:29 +0000)]
Improve content and structure of the Doxygen documentation for the
CIndex API. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 22:12:47 +0000 (22:12 +0000)]
(1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
agnostic).
(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.
(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.
More cleanup to version string generation pending...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 22:06:55 +0000 (22:06 +0000)]
Convert more testcases to checking the .ll file instead of the .s file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94229
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 21:44:22 +0000 (21:44 +0000)]
Yet more CIndex API cleanup:
- Added more routines to manipulate/compare source locations and ranges
- Switched clang_getCursor() over to take a CXSourceLocation rather
than file/line/column.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94226
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 21:36:53 +0000 (21:36 +0000)]
ui64, etc. are valid VS suffixes.
Fixes radar
7562363 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94224
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 20:59:36 +0000 (20:59 +0000)]
Rename pch::SVN_BRANCH_REVISION to pch::VERSION_CONTROL_BRANCH_REVISION.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94214
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 20:55:35 +0000 (20:55 +0000)]
Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94213
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 20:40:20 +0000 (20:40 +0000)]
Eliminate index-test; all of its tested functionality is now in c-index-test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 20:35:53 +0000 (20:35 +0000)]
Eliminate CIndex's dependency on the Clang Index library, since we
weren't actually using any of its facilities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 20:27:17 +0000 (20:27 +0000)]
Be sure to select primary bases among the nearly empties in preorder,
not just among the direct bases. Before we where missing nearly
empties that were bases of virtual base classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94208
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 19:49:59 +0000 (19:49 +0000)]
Teach CIndex's cursor visitor to restrict its traversal to a specific
region of interest (if provided). Implement clang_getCursor() in terms
of this traversal rather than using the Index library; the unified
cursor visitor is more complete, and will be The Way Forward.
Minor other tweaks needed to make this work:
- Extend Preprocessor::getLocForEndOfToken() to accept an offset
from the end, making it easy to move to the last character in the
token (rather than just past the end of the token).
- In Lexer::MeasureTokenLength(), the length of whitespace is zero.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94200
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 18:48:47 +0000 (18:48 +0000)]
Finish off fixing up debug information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 18:30:17 +0000 (18:30 +0000)]
Patch fixes a lookup bug in c++'s anonymous union member
lookup. Fixes radar
7562438 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 22 Jan 2010 17:37:20 +0000 (17:37 +0000)]
No need to canonicalize the type and use dyn_cast. Also, correctly diagnose trying to override a function returning an lvalue reference with a function overriding an rvalue reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 15:41:14 +0000 (15:41 +0000)]
Eliminate some Clang warnings
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 22 Jan 2010 13:59:13 +0000 (13:59 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 22 Jan 2010 13:07:41 +0000 (13:07 +0000)]
Fix an obvious goof that caused us to only see the top level of return types
when checking for covariance. Added some fun test cases, fixes PR6110.
This felt obvious enough to just commit. ;] Let me know if anything needs
tweaking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 06:45:05 +0000 (06:45 +0000)]
Ensure we output all non-virtual base vtables. Fixes PR5890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94163
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 22 Jan 2010 04:30:00 +0000 (04:30 +0000)]
Process cast according to the cast kind. Prepare for more specific cast
handling (for C++). No functionality change for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 22 Jan 2010 03:38:14 +0000 (03:38 +0000)]
Driver/Darwin: Update tool chain to use static clang_rt libraries provided by
compiler-rt. This tool chain now works on x86 and ARM, but isn't the x86 default
yet.
This drastically cleans up the linker invocation, old invocation:
--
"/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-weak_reference_mismatches" "non-weak" "-o" "a.out" "-lcrt1.10.6.o" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.." "t.o" "-lSystem" "-lgcc"
--
New invocation:
--
# For 10.6:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-o" "a.out" "-lcrt1.10.6.o" "t.o" "-lSystem"
# For 10.4:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.4" "-o" "a.out" "-lcrt1.o" "t.o" "-lSystem" "-lgcc_s.10.4" "/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib/clang/1.1/lib/darwin/libclang_rt.10.4.a"
--
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 22 Jan 2010 03:37:33 +0000 (03:37 +0000)]
Driver/Darwin/ld: Fix refacto, -force_cpusubtype_ALL should only be forwarded,
not always added.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 02:51:26 +0000 (02:51 +0000)]
Update debugging code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94145
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 22 Jan 2010 02:04:58 +0000 (02:04 +0000)]
Driver/Darwin/ld: Factor out getDarwinArchName, for getting the "Darwin" arch
name being used in an driver invocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94139
91177308 -0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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