]>
granicus.if.org Git - clang/log
Ted Kremenek [Sat, 22 Oct 2011 02:37:33 +0000 (02:37 +0000)]
Only emit implicit constant conversion truncation warnings in reachable code. Apparently this is what GCC does, and some code depends on this. Fixes <rdar://problem/
10321089 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142716
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 22 Oct 2011 02:14:27 +0000 (02:14 +0000)]
Refactor ThreadSafety to use PostOrderCFGView instead of its own copy (of TopologicallySortedCFG).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142714
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 22 Oct 2011 02:14:23 +0000 (02:14 +0000)]
Pull TopologicallySortedCFG out of LiveVariables into its own analysis: PostOrderCFGView.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 22 Oct 2011 01:56:45 +0000 (01:56 +0000)]
Fixes a minor hick up to my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142711
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 22 Oct 2011 01:21:15 +0000 (01:21 +0000)]
objc: private methods can have their attributes, no diagnostic is required.
None private methods if their implementation have attribute, they must exactly
match those in their declarations. // rdar://
10271563
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 22 Oct 2011 00:07:27 +0000 (00:07 +0000)]
Make changes necessary for N32/64 ABI conformance.
- Size of long double is 16 bytes for both N32 and N64.
- Size of pointers and long is 8 bytes for N64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142705
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 21 Oct 2011 23:57:02 +0000 (23:57 +0000)]
XFAIL test on Windows
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142703
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 21 Oct 2011 23:37:41 +0000 (23:37 +0000)]
More speculative test tweaking
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142701
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 21 Oct 2011 23:30:10 +0000 (23:30 +0000)]
Fix PR11073 by adding the argument type information to the decl we construct
for the function type. Update a testcase accordingly.
Patch initially by Anders Waldenborg!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 21 Oct 2011 23:20:41 +0000 (23:20 +0000)]
Switch tests from grep to FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142699
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 21 Oct 2011 23:03:08 +0000 (23:03 +0000)]
Add tests for CodeGen types in MS ABI. Based on patch by r4start.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142697
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 21 Oct 2011 23:02:28 +0000 (23:02 +0000)]
[PCH] When serializing Stmts, keep track of when sub statements are referenced again and
in such a case just write out a reference of a previously serialized Stmt, instead
of serializing it all over again.
This saves memory + space + [de]serializing time, and avoids blowing up memory
with pathological cases. rdar://
10293911
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142696
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 21 Oct 2011 23:02:22 +0000 (23:02 +0000)]
Don't try to set the "array filler" in a InitListExpr twice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142695
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 21 Oct 2011 22:49:56 +0000 (22:49 +0000)]
More ASTRecordLayout changes for MS ABI; based on patch by r4start.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142694
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 21 Oct 2011 22:27:12 +0000 (22:27 +0000)]
c++: support gcc's application of weak attribute on
class declaration which forces any such class and any
class that inherits from such a class to have their
typeinfo symbols be marked as weak.
// rdar://
10246395
A test/CodeGenCXX/weak-extern-typeinfo.cpp
M lib/Sema/SemaDeclCXX.cpp
M lib/Sema/SemaDeclAttr.cpp
M lib/CodeGen/CGRTTI.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142693
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 21 Oct 2011 22:21:24 +0000 (22:21 +0000)]
Doug reports that this test is still failing. Try applying Benjamin Kramer's
suggestion!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142692
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 21 Oct 2011 20:51:27 +0000 (20:51 +0000)]
Added support for thread safety attributes on destructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142685
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 21 Oct 2011 18:10:14 +0000 (18:10 +0000)]
Thread safety analysis refactoring: invalid lock expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142666
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 21 Oct 2011 18:06:53 +0000 (18:06 +0000)]
Thread safety analysis: add support for attributes on constructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142665
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 21 Oct 2011 18:03:52 +0000 (18:03 +0000)]
objective-c: Diagnose redeclaration of private
ivars in class extensions. // rdar://
10309454
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Fri, 21 Oct 2011 16:15:18 +0000 (16:15 +0000)]
Added documentation for the recently-added
addDecl() and makeDeclVisibleInContextInternal()
functions, and made the latter private since it
does not and should not have external clients.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142655
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 21 Oct 2011 16:14:33 +0000 (16:14 +0000)]
Refactoring and code cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142654
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 21 Oct 2011 15:47:52 +0000 (15:47 +0000)]
When performing name lookup for the previous declaration of a field,
be sure to consider all of the possible lookup results. We were
assert()'ing (but behaving correctly) for unresolved values. Fixes
PR11134 / <rdar://problem/
10290422 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142652
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 21 Oct 2011 11:55:09 +0000 (11:55 +0000)]
Permit auto SCS on parameter declarations, C++03 [dcl.stc]p2
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142649
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 21 Oct 2011 04:04:49 +0000 (04:04 +0000)]
Try to be exceedingly clever and make this test work properly whether it's run
under bash or under cmd.exe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142637
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 21 Oct 2011 03:57:52 +0000 (03:57 +0000)]
Treat the Microsoft/Borland keyword "__except" as a context-sensitive
keyword, because both libstdc++ and libc++ use "__except" as an
identifier. Fixes <rdar://problem/
10322555 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142636
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 21 Oct 2011 03:07:40 +0000 (03:07 +0000)]
Massage this test a little so it works when run inside the Google environment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Fri, 21 Oct 2011 02:57:43 +0000 (02:57 +0000)]
I added a new function to DeclContext called
addDeclInternal(). This function suppresses any
calls to FindExternalVisibleDeclsByName() while
a Decl is added to a DeclContext. This behavior
is required for the ASTImporter, because in the
case of the LLDB client the ASTImporter would be
called recursively to import the visible decls,
which leads to assertions because the recursive
call is seeing partially-formed types.
I also modified the ASTImporter to use
addDeclInternal() in all places where it would
otherwise use addDecl(). This fix should not
affect the rest of Clang, passes Clang's
testsuite, and fixes several serious LLDB bugs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 21 Oct 2011 02:32:14 +0000 (02:32 +0000)]
Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This is
closer to what GCC does, except that GCC also checks that the inodes for $PWD
and '.' match.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142633
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 20 Oct 2011 21:42:12 +0000 (21:42 +0000)]
Add -Wc++98-compat diagnostics for jumps which bypass initialization of non-POD
but trivially constructible and destructible variables in C++11 mode. Also
incidentally improve the precision of the wording for jump diagnostics in C++98
mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 20 Oct 2011 20:40:00 +0000 (20:40 +0000)]
When fixing up the storage class for an anonymous union, don't mark
the anonymous union as valid: our fixes have Fix-Its.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 20 Oct 2011 19:33:06 +0000 (19:33 +0000)]
Add test case for analyzer crash reported in <rdar://problem/
10308201 > (which is already fixed in mainline).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 20 Oct 2011 18:35:58 +0000 (18:35 +0000)]
'extern template' is a C++11 feature. Add an Extension for C++98 (this matches
gcc's behaviour), and a -Wc++98-compat-pedantic warning for C++11.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142597
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 20 Oct 2011 17:58:49 +0000 (17:58 +0000)]
There's no point in marking a declaration invalid just because it
shadows a template parameter. Complain about the shadowing (or not,
under -fms-extensions), but don't invalidate the declaration. Merely
forget about the template parameter declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142596
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 20 Oct 2011 17:21:46 +0000 (17:21 +0000)]
[libclang] Don't use C++-style comments in c-index-test.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142590
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 20 Oct 2011 16:41:18 +0000 (16:41 +0000)]
Diagnose class template (partial) specializations that occur in the
*wrong* class scope. This is one of the problems behind
<rdar://problem/
9676205 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142588
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 20 Oct 2011 15:58:54 +0000 (15:58 +0000)]
When we parse something that looks like a templated friend tag but
actually just has an extraneous 'template<>' header, strip off the
'template<>' header and treat it as a normal friend tag. Fixes PR10660
/ <rdar://problem/
9958322 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 20 Oct 2011 05:07:47 +0000 (05:07 +0000)]
Further refine the diagnostic categories for ARC diagnostics. Addresses <rdar://problem/
10245086 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142571
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 20 Oct 2011 03:28:47 +0000 (03:28 +0000)]
Add -Wc++98-compat warning for enumerations in nested name specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142568
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 20 Oct 2011 02:49:08 +0000 (02:49 +0000)]
FixIt insert 'static' for anonymous unions at global or namespace scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142566
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 20 Oct 2011 02:10:55 +0000 (02:10 +0000)]
Add a fixit to remove storage specifiers on anonymous enums.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142565
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 20 Oct 2011 01:45:20 +0000 (01:45 +0000)]
Fix all 80 col violations in include/clang/Basic, plus any trailing whitespace in the files I'm touching anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 20 Oct 2011 01:41:28 +0000 (01:41 +0000)]
Make the -verify bits in this test actually test something, and fix a few cases
where the test didn't work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 19 Oct 2011 23:46:05 +0000 (23:46 +0000)]
Define __STDC__ in -fms-extensions mode; defining it is consistent with gcc, and not defining it causes the system headers on multiple platforms to break with -fms-extensions because they assume the lack of a definition of __STDC__ implies a traditional (pre-ANSI) preprocessor. PR10324 and <rdar://problem/
10313809 > .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142554
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 19 Oct 2011 22:56:21 +0000 (22:56 +0000)]
80 cols (one I created in my last commit, plus a bunch of others that were already there)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142552
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 19 Oct 2011 22:43:29 +0000 (22:43 +0000)]
Don't provide errors for anonymous unions when they're actually anonymous classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 19 Oct 2011 21:33:05 +0000 (21:33 +0000)]
Improve the diagnostic when a comma ends up at the end of a declarator group
instead of a semicolon (as sometimes happens during refactorings). When such a
comma is seen at the end of a line, and is followed by something which can't
possibly be a declarator (or even something which might be a plausible typo for
a declarator), suggest that a semicolon was intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142544
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 19 Oct 2011 20:41:51 +0000 (20:41 +0000)]
-Wc++98-compat: warn on nontrivial types used in unions and anonymous structs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142541
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Wed, 19 Oct 2011 18:53:03 +0000 (18:53 +0000)]
Only warn at self-initialization if some later use is always uninitialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142538
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 19 Oct 2011 16:55:56 +0000 (16:55 +0000)]
-Wc++98-compat: diagnose if a reference is bound to a prvalue which does not
have an unambiguous accessible copying constructor; this is ill-formed in C++98.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 19 Oct 2011 14:50:34 +0000 (14:50 +0000)]
Fix the signatures of vfork, __sigsetjmp and sigsetjmp.
Patch by Dimitry Andric.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 19 Oct 2011 07:55:50 +0000 (07:55 +0000)]
Break out ssize_t test from Sema/format-strings-fixit.c
Move to a separate test that sets a specific target triple
so that the type of ssize_t is known.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 19 Oct 2011 06:04:55 +0000 (06:04 +0000)]
Improve the warning for cv-qualifiers on free functions, from Ahmed Charles!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 19 Oct 2011 05:51:43 +0000 (05:51 +0000)]
Add support for constant arrays, from Anders Waldenborg!.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 19 Oct 2011 05:50:34 +0000 (05:50 +0000)]
Add TypeKind.CONSTANTARRAY, from Anders Waldenborg!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 19 Oct 2011 05:49:29 +0000 (05:49 +0000)]
Fix error message for unknown type kind, from Anders Waldenborg!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 19 Oct 2011 05:47:46 +0000 (05:47 +0000)]
This new field was introduced in clang-c in r141277
Python needs this in its structure definition so it allocates enough
memory. From Anders Waldenborg!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142474
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 19 Oct 2011 05:19:50 +0000 (05:19 +0000)]
Fix pr9789, assert-on-invalid while instantiating an (invalid) class template with a non-final parameter pack. Also improve the warning for non-final parameter packs in this scenario so it only fires once, rather than once for every template parameter after the non-final parameter pack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 19 Oct 2011 04:17:22 +0000 (04:17 +0000)]
Tweak this test to test more directly what we want, and hopefully work around the brokenness of code completion under -fdelayed-template-parsing
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 19 Oct 2011 02:25:16 +0000 (02:25 +0000)]
Don't forget to complete the objc interface before asking for information,
otherwise lldb will suffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 19 Oct 2011 00:54:10 +0000 (00:54 +0000)]
Add a -Wc++98-compat warning for friend functions of class templates which would
be implicitly instantiated (resulting in a redefinition) in C++98.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142468
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 19 Oct 2011 00:44:01 +0000 (00:44 +0000)]
Add block information for ObjC @catch blocks.
Fixes rdar://
10282889
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142467
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 19 Oct 2011 00:43:52 +0000 (00:43 +0000)]
Add a new subclass of RunCleanupScopes that also handles creating new
lexical blocks for debug info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 19 Oct 2011 00:16:45 +0000 (00:16 +0000)]
Move static array parameter checks to SemaExpr, per Doug's request
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142465
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 19 Oct 2011 00:07:01 +0000 (00:07 +0000)]
-Wc++98-compat: warn if a SFINAE substitution in C++11 suppresses an access
control diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142463
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 18 Oct 2011 23:13:50 +0000 (23:13 +0000)]
objc: allow class name qualified with protocols in
iboutletcollection attribute. But ignore protocol
list. // rdar://
10296078
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:48 +0000 (23:06 +0000)]
[analyzer] Move predecessor into the NodeBuilder context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142454
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:44 +0000 (23:06 +0000)]
[analyzer] Make NodeBuilder and Pred node loosely coupled
NodeBuilder should not assume it's dealing with a single predecessor. Remove predecessor getters. Modify the BranchNodeBuilder to not be responsible for doing auto-transitions (which depend on a predecessor).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142453
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:38 +0000 (23:06 +0000)]
[analyzer] Remove StmtNodeBuilder from CheckerContext
It now only depends on a generic NodeBuilder instead. As part of this change, make the generic node builder results finalized by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:33 +0000 (23:06 +0000)]
[analyzer] Subclassing StmtBuilder from the NodeBuilder
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142451
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:29 +0000 (23:06 +0000)]
[analyzer] Remove dead code.
ExprEngineBuilders is not used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142450
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:25 +0000 (23:06 +0000)]
[analyzer] Remove redundant method + whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:21 +0000 (23:06 +0000)]
[analyzer] Modularize builder use in processBranch.
Take advantage of the new builders for branch processing. As part of this change pass generic NodeBuilder (instead of BranchNodeBuilder) to the BranchCondition callback and remove the unused methods form BranchBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:16 +0000 (23:06 +0000)]
[analyzer] Pull Pred out of NodeBuilderContext.
Each builder will have a different one, so it doesn't make sense to keep it in the context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:11 +0000 (23:06 +0000)]
[analyzer] Rely only on NodeBuilder inside CheckerContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142446
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:08 +0000 (23:06 +0000)]
[analyzer] Remove redundant assignment operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:06:04 +0000 (23:06 +0000)]
[analyzer] NodeBuilder Refactoring: Subclass BranchNodeBuilder from NodeBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142444
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 18 Oct 2011 23:05:58 +0000 (23:05 +0000)]
[analyzer] Node Builder refactoring: Introduce a simple Node Builder responsible for generating the node frontier.
Currently we have a bunch of different node builders which provide some common
functionality but are difficult to refactor. Each builder generates nodes of
different kinds and calculates the frontier nodes, which should be propagated
to the next step (after the builder dies).
Introduce a new NodeBuilder which provides very basic node generation facilities
but takes care of the second problem. The idea is that all the other builders
will eventually use it. Use this builder in CheckerContext instead of
StmtNodeBuilder (the way the frontier is propagated to the StmtBuilder
is a hack and will be removed later on).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142443
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 18 Oct 2011 22:28:37 +0000 (22:28 +0000)]
More metaprogramming with builtin types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 18 Oct 2011 21:59:54 +0000 (21:59 +0000)]
[libclang] Make sure we do a correct invalid check in clang_getExpansionLocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 18 Oct 2011 21:43:22 +0000 (21:43 +0000)]
Minor tweak to test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142427
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 18 Oct 2011 21:39:00 +0000 (21:39 +0000)]
-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142426
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 18 Oct 2011 21:25:15 +0000 (21:25 +0000)]
Remove unused data member
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 18 Oct 2011 21:20:17 +0000 (21:20 +0000)]
Provide result types for code completions that describe built-in
expressions (this, sizeof, etc.).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142424
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 18 Oct 2011 21:18:53 +0000 (21:18 +0000)]
Add a __has_feature check for arc_cf_code_audited.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142423
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 18 Oct 2011 21:02:43 +0000 (21:02 +0000)]
Macro metaprogramming for builtin types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 18 Oct 2011 20:49:44 +0000 (20:49 +0000)]
-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Oct 2011 20:40:38 +0000 (20:40 +0000)]
Frontend: Support -iframework.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 18 Oct 2011 20:08:55 +0000 (20:08 +0000)]
Simplify RecordDeclCXX::setBases slightly. No functional change.
Add test that a variadic base list which expands to 0 bases doesn't make the
class a non-aggregate. This test passed before the change, too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142411
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 18 Oct 2011 19:54:31 +0000 (19:54 +0000)]
objc: more changes in use of IBOutletCollection attribute.
'Class' is disallowed as argument. If the argument is missing,
NSObject is assumed. // rdar://
10296078
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 18 Oct 2011 19:49:19 +0000 (19:49 +0000)]
[arcmt] Rewrite attributes in extensions as well. rdar://
9992142
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 18 Oct 2011 19:49:16 +0000 (19:49 +0000)]
Set the objc "property attributes as written" for extension properties as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142406
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 18 Oct 2011 18:33:57 +0000 (18:33 +0000)]
In C++11, a class's members are allowed to be nominated as friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142393
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 18 Oct 2011 17:40:15 +0000 (17:40 +0000)]
[driver] Make the driver to link the simulator arclite lib when passing -mios-simulator-version-min.
rdar://
10218700
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142372
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 18 Oct 2011 17:11:10 +0000 (17:11 +0000)]
objc: diagnose invalid argument to an
iboutletcollection attribute intead of crashing.
// rdar://
10296078
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 18 Oct 2011 16:50:06 +0000 (16:50 +0000)]
[libclang] Since an objc extension semantically continues the interface of the class
don't use unique USRs for them, otherwise we fail to associate @implementation methods
with the methods in extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 18 Oct 2011 16:47:30 +0000 (16:47 +0000)]
Make it possible to compute the type of 'this' without capturing
it. Refactoring to be used in a moment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142360
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 18 Oct 2011 16:29:03 +0000 (16:29 +0000)]
Add code completions for C++0x expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 18 Oct 2011 15:50:50 +0000 (15:50 +0000)]
[libclang] Index implicit property references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 18 Oct 2011 15:13:14 +0000 (15:13 +0000)]
[libclang] When printing the diagnostic print it with a new line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142354
91177308 -0d34-0410-b5e6-
96231b3b80d8