Argyrios Kyrtzidis
d03fc4d4e1
Add an additional check in test/Sema/ext_vector_casts.c
...
llvm-svn: 198479
2014-01-04 06:27:45 +00:00
Ted Kremenek
776409286b
[analyzer] Remove IdempotentOperations checker.
...
This checker has not been updated to work with interprocedural analysis,
and actually contains both logical correctness issues but also
memory bugs. We can resuscitate it from version control once there
is focused interest in making it a real viable checker again.
llvm-svn: 198476
2014-01-04 05:52:11 +00:00
Argyrios Kyrtzidis
eb68f6a9de
[Sema] When checking if a bitcast is appropriate between vector types, take into
...
consideration the num-of-elements*width-of-element width.
Disallow casts when such width is not equal between the vector types otherwise
we may end up with an invalid LLVM bitcast.
rdar://15722308.
llvm-svn: 198474
2014-01-04 03:31:22 +00:00
Richard Trieu
658eb68e82
Ignore qualified templated functions for -Winfinite-recursion. This treats
...
functions like Foo<5>::run() the same way as run<5>() for this warning.
llvm-svn: 198470
2014-01-04 01:57:42 +00:00
Reid Kleckner
5f08094106
[ms-cxxabi] Improve vbtable name mangling accuracy
...
Summary:
This makes us more compatible with MSVC 2012+ and fixes PR17748 where we
would give two tables the same name.
Rather than doing a fresh depth-first traversal of the inheritance graph
for every record's vbtables, now we memoize vbtable paths for each
record. By doing memoization, we end up considering virtual bases of
subobjects that come later in the depth-first traversal. Where
previously we would have ignored a virtual base that we'd already seen,
we now consider it for name mangling purposes without emitting a
duplicate vbtable for it.
Reviewers: majnemer
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2509
llvm-svn: 198462
2014-01-03 23:42:00 +00:00
Adrian Prantl
96e70d9148
Debug info: Ensure that the last stop point in a function is still within
...
the lexical block formed by the compound statement that is the function
body.
rdar://problem/15010825
llvm-svn: 198461
2014-01-03 23:34:30 +00:00
Aaron Ballman
69714e78e0
Refactored Builtin::Context::isPrintfLike and isScanfLike into a helper function. The implementations are identical, except for the format arguments being searched for.
...
No functional changes intended.
llvm-svn: 198446
2014-01-03 20:10:54 +00:00
Argyrios Kyrtzidis
98045c1a23
Fix 80 col violation.
...
llvm-svn: 198444
2014-01-03 19:53:09 +00:00
Argyrios Kyrtzidis
d8a35325a2
Pass the decl directly to the diagnostic, no need to call getDeclName().
...
llvm-svn: 198442
2014-01-03 19:39:23 +00:00
Aaron Ballman
68af21c975
Fixing a FIXME; the RetTy template parameter is always bool in practice, and so it has been removed. No functional changes intended.
...
llvm-svn: 198440
2014-01-03 19:26:43 +00:00
Rafael Espindola
c418ae93a8
Update for llvm's DataLayout including mangling information.
...
llvm-svn: 198439
2014-01-03 19:22:05 +00:00
Aaron Ballman
1d17bde708
Marked the default constructor as an LLVM_DELETED_FUNCTION.
...
llvm-svn: 198435
2014-01-03 18:51:47 +00:00
Aaron Ballman
75ee4cc830
Removed one of the string versions of getQualifiedNameAsString, and switched over to using printQualifiedName where possible. No functional changes intended.
...
llvm-svn: 198433
2014-01-03 18:42:48 +00:00
Argyrios Kyrtzidis
2080d90f37
[objc] Refactor and improve functionality for the -Wunused-property-ivar warning.
...
- Remove the additions to ObjCMethodDecl & ObjCIVarDecl that were getting de/serialized and consolidate
all functionality for the checking for this warning in Sema::DiagnoseUnusedBackingIvarInAccessor
- Don't check immediately after the method body is finished, check when the @implementation is finished.
This is so we can see if the ivar was referenced by any other method, even if the method was defined after the accessor.
- Don't silence the warning if any method is called from the accessor silence it if the accessor delegates to another method via self.
rdar://15727325
llvm-svn: 198432
2014-01-03 18:32:18 +00:00
Rafael Espindola
29db13a753
Reformat the description strings. No functionality change.
...
llvm-svn: 198430
2014-01-03 18:13:17 +00:00
Aaron Ballman
7cb6741b3b
We haven't cared about VS 2005 in a long time, and VS 2003 in even longer.
...
llvm-svn: 198429
2014-01-03 18:10:25 +00:00
Aaron Ballman
b190f974c9
Fixed a FIXME; created a print method for Selectors that accepts a raw_ostream, and started using it in places it made sense.
...
No functional changes intended, just API cleanliness.
llvm-svn: 198428
2014-01-03 17:59:55 +00:00
Alexander Kornienko
6de39492da
Make clang::ento::CreateAnalysisConsumer a part of a public interface of the static analyzer.
...
Summary:
This allows for a better alternative to the FrontendAction hack used in
clang-tidy in order to get static analyzer's ASTConsumer.
Reviewers: jordan_rose, krememek
Reviewed By: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2505
llvm-svn: 198426
2014-01-03 17:23:10 +00:00
Aaron Ballman
2cfbc00506
Simplifying the mutual exclusion check now that the diagnostics engine knows how to handle Attr objects directly. Updates an associated test case due to the attribute name being properly quoted again.
...
llvm-svn: 198424
2014-01-03 16:23:46 +00:00
Joey Gouly
b6eb314c3a
[OpenCL] Add test case for previous commit.
...
llvm-svn: 198422
2014-01-03 15:11:57 +00:00
Aaron Ballman
d1e6e141c1
Using the proper helper function instead of manually doing this work. No functional changes intended.
...
llvm-svn: 198421
2014-01-03 15:02:58 +00:00
Aaron Ballman
b9bb201194
Removing some more unnecessary manual quotes from diagnostics.
...
llvm-svn: 198420
2014-01-03 14:54:10 +00:00
Aaron Ballman
691e2274f6
Removing an unneeded typecast. getScopeRep() already returns a NestedNameSpecifier.
...
llvm-svn: 198419
2014-01-03 14:48:20 +00:00
Aaron Ballman
1fb3955cee
Removing some more unnecessary manual quotes from diagnostics.
...
llvm-svn: 198418
2014-01-03 14:23:03 +00:00
Joey Gouly
96b94e610b
[OpenCL] Variables in the constant address space must be initialized.
...
llvm-svn: 198417
2014-01-03 14:16:55 +00:00
Aaron Ballman
5dff61d322
Removing some more unnecessary manual quotes from diagnostics.
...
llvm-svn: 198416
2014-01-03 14:06:37 +00:00
Aaron Ballman
4a97967b5f
It turns out the problem was a bit more wide-spread. Removing a lot of unneeded typecasts. getScopeRep() already returns a NestedNameSpecifier.
...
No functional changes intended.
llvm-svn: 198414
2014-01-03 13:56:08 +00:00
Aaron Ballman
5fe6c805dc
Removing an unneeded typecast. getScopeRep() already returns a NestedNameSpecifier.
...
llvm-svn: 198413
2014-01-03 13:45:46 +00:00
Aaron Ballman
fee0cd45fe
Removing some more unnecessary manual quotes from diagnostics. Updated the related test case to ensure correctness.
...
llvm-svn: 198412
2014-01-03 13:34:55 +00:00
Daniel Jasper
352dae199a
clang-format: Recognize single-line macro usages inside macros.
...
Before:
#define LIST(L) \
L(FirstElement) L(SecondElement) L(ThirdElement) L(FourthElement) \
L(FifthElement)
After:
#define LIST(L) \
L(FirstElement) \
L(SecondElement) \
L(ThirdElement) \
L(FourthElement) \
L(FifthElement)
llvm-svn: 198407
2014-01-03 11:50:46 +00:00
Aaron Ballman
6d086d7dc1
Removing some more unnecessary manual quotes from diagnostics.
...
llvm-svn: 198395
2014-01-03 02:20:27 +00:00
Aaron Ballman
25dc1e1d19
Removing some more unnecessary manual quotes from attribute diagnostics.
...
llvm-svn: 198392
2014-01-03 02:14:08 +00:00
Aaron Ballman
c0550740f0
Removing some more unnecessary manual quotes from attribute diagnostics.
...
llvm-svn: 198391
2014-01-03 02:07:43 +00:00
Ted Kremenek
9b12e72376
[analyzer] Don't track return value of NSNull +null for retain/release tracking.
...
Fixes <rdar://problem/12858915>.
llvm-svn: 198388
2014-01-03 01:19:28 +00:00
Aaron Ballman
1bda4596b6
Removing some more unnecessary manual quotes from attribute diagnostics.
...
llvm-svn: 198387
2014-01-03 01:09:27 +00:00
Reid Kleckner
b0c246e25e
Remove unused variable to fix clang warning
...
llvm-svn: 198382
2014-01-03 00:36:32 +00:00
Reid Kleckner
b40a27dad8
[ms-cxxabi] Move VBTableBuilder from CodeGen over to AST/VTableBuilder.cpp
...
Summary:
No functionality change.
This code should live here long-term because we should be able to use it
to compute correct vftable names.
It turns out that the most natural way to implement the naming algorithm
is to use a caching layer similar to what we already have for virtual
table info in VTableContext. Subsequent changes will take advantage of
this to fix PR17748, where we have a vbtable name collision.
Reviewers: majnemer
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2499
llvm-svn: 198380
2014-01-03 00:14:35 +00:00
Aaron Ballman
3d216a579c
Removed an unnecessary %select from the alignas diagnostics. The attribute already knows how it was spelled.
...
llvm-svn: 198375
2014-01-02 23:39:11 +00:00
Aaron Ballman
e2bb78a740
This diagnostic should not have had the manual quotation marks. Its only usage passed in an Attr object, which was already quoted when printing the diagnostic. However, there was no test case that caught this bug -- one has been added.
...
llvm-svn: 198373
2014-01-02 23:22:40 +00:00
Aaron Ballman
1da282ae2d
Removing some more unnecessary manual quotes from attribute diagnostics. Updated the associated testcase because QualType pretty printing was an improvement.
...
llvm-svn: 198372
2014-01-02 23:15:58 +00:00
Aaron Ballman
9f6fec4419
Removing some more unnecessary manual quotes from attribute diagnostics.
...
llvm-svn: 198371
2014-01-02 23:02:01 +00:00
Aaron Ballman
34b3475cd3
Reworded the NSObject attribute diagnostics to be more consistent with other attribute diagnostics. Also updated the associated test case.
...
llvm-svn: 198368
2014-01-02 22:45:33 +00:00
Fariborz Jahanian
5b3105d2cb
ObjectiveC. Remove false positive warning for missing property
...
backing ivar by not issuing this warning if ivar is referenced
somewhere and accessor makes method calls. // rdar://15727325
llvm-svn: 198367
2014-01-02 22:42:09 +00:00
Aaron Ballman
44ebc079b9
Removing some manual quotes from this diagnostic, since the AST diagnostics engine knows how to handle NamedDecl objects.
...
llvm-svn: 198365
2014-01-02 22:29:41 +00:00
Aaron Ballman
05e420abad
Updated the wording of two attribute-related diagnostics so that they print the offending attribute name. Also updates the associated test cases.
...
llvm-svn: 198355
2014-01-02 21:26:14 +00:00
Douglas Gregor
6beabeed39
Objective-C ARC++: Prefer references to __strong/__weak over __unsafe_unretained.
...
Fixes <rdar://problem/15713945>.
llvm-svn: 198343
2014-01-02 19:42:02 +00:00
Douglas Gregor
d1b760a670
CMake separate projects: finish output-directory changes.
...
Make sure clang-tblgen, clang++, and clang-cl get created in the Clang
binary build directory.
llvm-svn: 198331
2014-01-02 18:37:47 +00:00
Jordan Rose
4e754085ce
[CMake] Add missing set_output_directory after Takumi's change in r198205.
...
In a standalone build, Clang binaries should end up in Clang's build folder,
not LLVM's.
Xcode still has a few issues finding auxiliary tools and libraries in the
build folders. I'll fix those next.
llvm-svn: 198328
2014-01-02 18:28:32 +00:00
Aaron Ballman
6d80b3c15d
Using the quoted version of an attribute name for consistency with other attribute diagnostics.
...
llvm-svn: 198326
2014-01-02 18:10:17 +00:00
Fariborz Jahanian
1cc7ae1d08
ObjectiveC. Class methods must be ignored when looking for
...
property accessor's missing backing ivar. This eliminates
the bogus warning being issued. // rdar://15728901
llvm-svn: 198322
2014-01-02 17:24:32 +00:00