]>
granicus.if.org Git - clang/log
Francois Pichet [Wed, 17 Aug 2011 01:06:54 +0000 (01:06 +0000)]
Add serialization support for ClassScopeFunctionSpecializationDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137799
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 17 Aug 2011 00:43:03 +0000 (00:43 +0000)]
[python] Add support for CXType to python bindings.
Patch by Anders Waldenborg!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 17 Aug 2011 00:31:25 +0000 (00:31 +0000)]
[libclang] Make clang_getCursor able to handle locations that point inside macro arguments.
e.g. for:
\define INVOKE(METHOD, CLASS) [CLASS METHOD]
void test2() {
INVOKE(meth, MyClass);
}
Pointing at 'meth' will give a CXCursor_ObjCMessageExpr and pointing at 'MyClass'
will give a CXCursor_ObjCClassRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 17 Aug 2011 00:31:23 +0000 (00:31 +0000)]
Make Lexer::GetBeginningOfToken able to handle macro arg expansion locations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137795
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 17 Aug 2011 00:31:20 +0000 (00:31 +0000)]
Introduce SourceManager::getMacroArgExpandedLocation function.
If we pass it a source location that points inside a function macro argument,
the returned location will be the macro location in which the argument was expanded.
If a macro argument is used multiple times, the expanded location will
be at the first expansion of the argument.
e.g.
MY_MACRO(foo);
^
Passing a file location pointing at 'foo', will yield a macro location
where 'foo' was expanded into.
Make SourceManager::getLocation call getMacroArgExpandedLocation as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137794
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 17 Aug 2011 00:31:18 +0000 (00:31 +0000)]
Make SourceManager::isBeforeInTranslationUnit handle macro locations correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137793
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 17 Aug 2011 00:31:14 +0000 (00:31 +0000)]
[PCH] When writing out ExpansionInfo, make sure we don't lose track if it's a macro arg expansion or not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137792
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 16 Aug 2011 22:30:10 +0000 (22:30 +0000)]
Switch this code to use the more idiomatic 'dyn_cast' pattern.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137780
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:54 +0000 (21:41 +0000)]
Migrate test from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137773
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:52 +0000 (21:41 +0000)]
Migrate from llvm/test/FrontendC++ and FileCheckize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137772
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:50 +0000 (21:41 +0000)]
Migrate from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137771
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:48 +0000 (21:41 +0000)]
Migrate test from llvm/test/FrontendC++ and FileCheckize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:46 +0000 (21:41 +0000)]
Migrate test from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:44 +0000 (21:41 +0000)]
Migrate from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137768
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:41 +0000 (21:41 +0000)]
Migrate from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137767
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:40 +0000 (21:41 +0000)]
Migrate test from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137766
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:38 +0000 (21:41 +0000)]
Migrate from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137765
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:35 +0000 (21:41 +0000)]
Migrate varargs.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137764
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:33 +0000 (21:41 +0000)]
Migrate weak-external.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137763
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:31 +0000 (21:41 +0000)]
Migrate x86-64-abi-sret-vs-2word-struct-param.cpp from
llvm/test/FrontendC++ and FileCheckize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Aug 2011 21:41:26 +0000 (21:41 +0000)]
Migrate thunk-linkonce-odr.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137761
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 16 Aug 2011 21:37:52 +0000 (21:37 +0000)]
[analyzer] teach ExprEngine about loads from static C++ class fields. Fixes <rdar://problem/
9948787 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137760
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Tue, 16 Aug 2011 21:24:21 +0000 (21:24 +0000)]
[analyzer] Overhaul of checker registration in preparation for basic plugin support. Removes support for checker groups (we can add them back in later if we decide they are still useful), and -analyzer-checker-help output is a little worse for the time being (no packages).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 16 Aug 2011 21:01:06 +0000 (21:01 +0000)]
Robustify test, there is no need to check metadata number which can change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137752
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 16 Aug 2011 20:58:22 +0000 (20:58 +0000)]
Finalize debug info after all deferred globals are emitted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137750
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 16 Aug 2011 20:02:05 +0000 (20:02 +0000)]
MacOSKeychainAPIChecker: Turn it on by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137740
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 16 Aug 2011 18:33:55 +0000 (18:33 +0000)]
Update createMCAsmParser() to match r137735.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137736
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 16 Aug 2011 16:30:24 +0000 (16:30 +0000)]
MacOSKeychainAPIChecker: Do not report double allocation if first allocation returned an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137720
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 16 Aug 2011 10:57:37 +0000 (10:57 +0000)]
[analyzer] Enhance ConditionVisitor to handle arbitrary ValueDecls in binary expressions, and also handle inverting the order of comparison when the named decl appears on the RHS.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137714
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 16 Aug 2011 03:45:31 +0000 (03:45 +0000)]
CMake: "clang-test" may not depend on check.deps.
...I believe it would not break anything...
FIXME: "check-all" may not be generated w/o LLVM_INCLUDE_TESTS.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 16 Aug 2011 03:44:38 +0000 (03:44 +0000)]
[analyzer] fix operation inversion calculation in ConditionVisitor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137708
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 16 Aug 2011 01:53:41 +0000 (01:53 +0000)]
[analyzer] Enhance ConditionVisitor to understand eagerly evaluated (simple) binary conditions, and teach it to only focus on constraint changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137705
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 16 Aug 2011 01:53:39 +0000 (01:53 +0000)]
[analyzer] add ExprEngine::getEagerlyAssumedTags() to allow externally querying of "eagerly assumed" expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137704
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 16 Aug 2011 00:49:19 +0000 (00:49 +0000)]
[analyzer] Remove PostStmtCustom ProgramPoint. It can be represented using tagged PostStmts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137697
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 15 Aug 2011 23:43:33 +0000 (23:43 +0000)]
Fix tests for non-darwin hosts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137688
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Aug 2011 23:24:31 +0000 (23:24 +0000)]
Move test from llvm/test/FrontendCXX and update.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137682
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 15 Aug 2011 23:23:15 +0000 (23:23 +0000)]
MacOSKeychainAPIChecker: The security API/memory leak checker should always generate regular nodes instead of sink nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137681
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 15 Aug 2011 23:05:22 +0000 (23:05 +0000)]
Add ProgramState.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137677
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 15 Aug 2011 23:03:51 +0000 (23:03 +0000)]
Add missing header files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137676
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Aug 2011 23:01:55 +0000 (23:01 +0000)]
Use new DIBuilder::finalize() at the end to wrap up debug info encoding for a translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Aug 2011 22:48:14 +0000 (22:48 +0000)]
FileCheckize this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137671
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 15 Aug 2011 22:40:24 +0000 (22:40 +0000)]
[libclang] Require explicit cursor visitation for all TypeLocs (compilation will
fail if a TypeLoc kind is not handled) and handle DecltypeTypeLoc and InjectedClassNameTypeLoc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137670
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Aug 2011 22:38:22 +0000 (22:38 +0000)]
'pure' and 'const' functions should also be marked nounwind. Migrate
test over from llvm/test/FrontendC++ and update others to account for
the change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137669
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 15 Aug 2011 22:10:47 +0000 (22:10 +0000)]
Take 2 (take 3?) at removing derelict clang.xcodeproj. All Xcode users should be using CMake, as the clang.xcodeproj is never up-to-date and cannot actually build Clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137666
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 15 Aug 2011 22:09:50 +0000 (22:09 +0000)]
Rename GRState to ProgramState, and cleanup some code formatting along the way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137665
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 15 Aug 2011 21:45:01 +0000 (21:45 +0000)]
Fix the buildbot test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137660
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 15 Aug 2011 21:04:07 +0000 (21:04 +0000)]
Track in the AST whether a function is constexpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137653
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 15 Aug 2011 19:13:06 +0000 (19:13 +0000)]
Make -findirect-virtual-calls and -fterminated-vtables aliases of -fapple-kext.
Outside the driver, they were already treated that way, but the driver was not
giving them the same special treatment as -fapple-kext, e.g., falling back to
llvm-gcc for i386/Darwin kexts. Radar
9868422 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137639
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 15 Aug 2011 19:13:02 +0000 (19:13 +0000)]
Remove duplicate option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137638
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 15 Aug 2011 18:44:43 +0000 (18:44 +0000)]
[libclang] Handle AttributedTypeLoc for cursor visitation. Fixes rdar://
9535717 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 15 Aug 2011 18:42:00 +0000 (18:42 +0000)]
MacOSKeychainAPIChecker: Use llvm::SmallString instead of std::string (as per code review for r137523).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137633
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Mon, 15 Aug 2011 17:50:06 +0000 (17:50 +0000)]
Add fixit notes for -Wconstant-logical-operand.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 15 Aug 2011 13:59:46 +0000 (13:59 +0000)]
Teach reference initialization from the result of a user-defined
conversion to initialize the standard conversion *after* the
user-defined conversion properly. Fixes PR10644.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sun, 14 Aug 2011 22:30:29 +0000 (22:30 +0000)]
fix typo in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137592
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sun, 14 Aug 2011 21:38:35 +0000 (21:38 +0000)]
Another typo found by Nico; Doug also warned me about it, but I didn't listen to him.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137591
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sun, 14 Aug 2011 14:28:49 +0000 (14:28 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 14 Aug 2011 04:50:34 +0000 (04:50 +0000)]
Fix r137086 to actually work properly in general. PR10650.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137574
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sun, 14 Aug 2011 03:52:19 +0000 (03:52 +0000)]
Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.
Example:
template <class T>
class A {
public:
template <class U> void f(U p) { }
template <> void f(int p) { } // <== class scope specialization
};
This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137573
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 14 Aug 2011 00:37:22 +0000 (00:37 +0000)]
Fix "Uninitialized" warnings on g++-4.4.
In fact, they are false warnings but it seems g++-4.4 might be unable to know they must be false.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137568
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 13 Aug 2011 23:48:55 +0000 (23:48 +0000)]
Reject -mkernel for i386/Darwin C++ code; fall back to llvm-gcc instead.
Since -mkernel implies -fapple-kext, this just extends the current behavior
for -fapple-kext to apply for -mkernel as well. Radar
9933387 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 13 Aug 2011 23:13:37 +0000 (23:13 +0000)]
Add support of -x objc-cpp-output, -x objc++-cpp-output to the Driver.
Matches gcc, and is also required for using ccache with clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 13 Aug 2011 19:03:50 +0000 (19:03 +0000)]
Accept -x objc++-cpp-output as an alias for -x objective-c++-cpp-output
This is the ObjC++ version of r129201. It's for example needed to use
ccache with clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137560
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Sat, 13 Aug 2011 05:47:04 +0000 (05:47 +0000)]
Fix C++0x narrowing conversion errors in Clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 13 Aug 2011 05:03:46 +0000 (05:03 +0000)]
Move handling of vget_lane/vset_lane before the code that checks the type.
Unlike most of the other Neon intrinsics, these are not overloaded and do not
have the extra argument that specifies the vector type. This has not been
fatal because the lane number operand is supposed to be an ICE and so that
value has harmlessly been used as the type identifier. Radar
9901281 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Sat, 13 Aug 2011 02:10:15 +0000 (02:10 +0000)]
MacOSKeychainAPIChecker: Test all APIs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Aug 2011 23:38:19 +0000 (23:38 +0000)]
[driver] Make sure to update the iterator end when erasing for Args.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 23:37:29 +0000 (23:37 +0000)]
Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137537
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 12 Aug 2011 23:33:52 +0000 (23:33 +0000)]
Update clang tests for r137527.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Aug 2011 23:30:05 +0000 (23:30 +0000)]
[driver] When generating clang failure diagnostics, don't try to preprocess
inputs that aren't preprocessable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Aug 2011 23:16:53 +0000 (23:16 +0000)]
Return the proper type for objects when given a .o extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 23:06:47 +0000 (23:06 +0000)]
Document purpose of ProgramPointTag::getTagKind().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137530
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 23:04:46 +0000 (23:04 +0000)]
[analyzer] change "tag" in ProgramPoint from "void*" to a ProgramPointTag*.
Having a notion of an actual ProgramPointTag will aid in introspection of the analyzer's behavior.
For example, the GraphViz output of the analyzer will pretty-print the tags in a useful manner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137529
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 12 Aug 2011 22:47:22 +0000 (22:47 +0000)]
MacOSKeychainAPIChecker: If the allocated data address entered as an enclosing function parameter, skip it to avoid false positives.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137526
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Aug 2011 22:08:57 +0000 (22:08 +0000)]
[driver] Refactor a bit to enable a few fixes when generating diagnostics. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 12 Aug 2011 21:56:43 +0000 (21:56 +0000)]
MacOSKeychainAPIChecker:
Report errors earlier: on checkDeadSymbols() and clear the state after the symbol we are tracking goes out of scope.
Also, perform lazy error checking. Instead of forcing the paths to be split depending one the return value of the allocator, make the return symbol depend on the allocated data symbol, which prolongs its life span to the time when the allocated data symbol becomes dead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137523
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Fri, 12 Aug 2011 21:41:07 +0000 (21:41 +0000)]
[analyzer] Nitpicks on Olaf's patch, which I meant to e-mail but then didn't in
time. One is cleanup, the other is me being OCD about enum group nesting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 12 Aug 2011 21:14:26 +0000 (21:14 +0000)]
MacOSKeychainAPIChecker: There is no need to use SymbolMetadata to represent the allocated data symbol, we can just use the symbol corresponding to the SymbolicRegion. This simplifies tracking of the symbol, for example, SymbolMetadata needs to go through extra hoops to stay alive.
Make AllocationState internal to the MacOSKeychainAPIChecker class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137514
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Fri, 12 Aug 2011 20:56:43 +0000 (20:56 +0000)]
Conversions to bool count as integer conversions for the purposes of
the C++0x narrowing error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137512
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 12 Aug 2011 20:47:08 +0000 (20:47 +0000)]
metadata generated by the compiler does not include the weak
attribute of a property. patch by Remy Demarest fixes it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137509
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 20:46:54 +0000 (20:46 +0000)]
Place err_cfstring_literal_not_string_constant and warn_cfstring_truncated under "-WCFString" flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137508
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 20:46:52 +0000 (20:46 +0000)]
Place diagnostic warn_stringcompare under the "-Wstring-compare" flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137507
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 20:46:49 +0000 (20:46 +0000)]
Place warnings related to incorrect "main()" declaration under "-Wmain".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 20:46:45 +0000 (20:46 +0000)]
Add -Wtypename-missing flag for diagnostic warn_typename_missing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 20:02:48 +0000 (20:02 +0000)]
[analyzer] Introduce new MemRegion, "TypedValueRegion", so that we can separate TypedRegions that implement getValueType() from those that don't.
Patch by Olaf Krzikalla!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 12 Aug 2011 18:44:32 +0000 (18:44 +0000)]
Fix some comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Aug 2011 17:43:31 +0000 (17:43 +0000)]
switch clang to use the new-new way of creating llvm::StructType's.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Aug 2011 17:09:30 +0000 (17:09 +0000)]
Overriding the predefined Protocol isn't something that's actually
done and is likely to not work well anyway; take away this unnecessary
complexity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137465
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 14:41:23 +0000 (14:41 +0000)]
Revert "Fix crash in CFGBuilder involving implicit destructor calls and gotos jumping after an object was declared. Fixes PR 10620."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Aug 2011 06:49:56 +0000 (06:49 +0000)]
Switch the __int128_t and __uint128_t types over to predefined types
in the AST format, which are built lazily by the ASTContext when
requested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137437
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 12 Aug 2011 06:24:04 +0000 (06:24 +0000)]
docs/doxygen.css: Import .memitem, .memproto and .memdoc from llvm/doxygen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Aug 2011 06:17:30 +0000 (06:17 +0000)]
Switch the Objective-C 'SEL' type over to a predefined type in the
AST file format, lazily generating the actual declaration in
ASTContext as needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Aug 2011 05:59:41 +0000 (05:59 +0000)]
Switch the Objective-C 'Class' type over to a predefined type in the
AST file format, lazily generating the actual declaration in
ASTContext as needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137431
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 12 Aug 2011 05:49:51 +0000 (05:49 +0000)]
De-Unicode-ify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Aug 2011 05:46:01 +0000 (05:46 +0000)]
Move the creation of the predefined typedef for Objective-C's 'id'
type over into the AST context, then make that declaration a
predefined declaration in the AST format. This ensures that different
AST files will at least agree on the (global) declaration ID for 'id',
and eliminates one of the "special" types in the AST file format.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 12 Aug 2011 04:09:37 +0000 (04:09 +0000)]
Fix a raw string literal test case to actually use a raw string literal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137427
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Aug 2011 04:09:00 +0000 (04:09 +0000)]
Fix crash in CFGBuilder involving implicit destructor calls and gotos jumping after an object was declared. Fixes PR 10620.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137426
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 12 Aug 2011 03:20:18 +0000 (03:20 +0000)]
Fix a couple raw string literal tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137422
91177308 -0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Aug 2011 02:30:14 +0000 (02:30 +0000)]
Alignment of a va_arg must be at least as large as the ABI's minimum alignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137420
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 12 Aug 2011 01:56:14 +0000 (01:56 +0000)]
include/clang/Config/config.h.cmake: Reorder and reword to follow (generated) llvm/Config/config.h.in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137415
91177308 -0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Aug 2011 01:43:14 +0000 (01:43 +0000)]
Add definition of a static member of a class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137411
91177308 -0d34-0410-b5e6-
96231b3b80d8