]>
granicus.if.org Git - clang/log
Ted Kremenek [Fri, 1 Jun 2012 20:04:04 +0000 (20:04 +0000)]
static analyzer: add inlining support for directly called blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Fri, 1 Jun 2012 18:11:16 +0000 (18:11 +0000)]
Don't allow multiple correction candidates that have the same identifier
but different nested name specifiers to quietly clobber each other so
only one remains if they do not refer to the same NamedDecl. Fixes
PR12951.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 1 Jun 2012 16:48:55 +0000 (16:48 +0000)]
#ifdef out a broken test on win32
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157819
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 1 Jun 2012 16:24:43 +0000 (16:24 +0000)]
[analyzer] SATestBuild should execute SVN updates even if Verbose is off.
Also, re-use glob results when looking for failure logs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 1 Jun 2012 16:24:38 +0000 (16:24 +0000)]
[analyzer] Fix SATestAdd to work with SATestBuild.
Also, eliminate global 'IsReferenceBuild' in SATestBuild. It doesn't get
passed around that much.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157816
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 1 Jun 2012 14:50:43 +0000 (14:50 +0000)]
Added a test for ToolInvocation::mapVirtualFile method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157812
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 1 Jun 2012 00:22:57 +0000 (00:22 +0000)]
Support C++11 enum forward declarations.
Part of rdar://
11570854
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157787
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 1 Jun 2012 00:10:47 +0000 (00:10 +0000)]
[arcmt] Use CFBridgingRetain/CFBridgingRelease instead of __bridge_retained/__bridge_transfer
when migrating.
rdar://
11569198
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157785
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 1 Jun 2012 00:02:08 +0000 (00:02 +0000)]
Anonymous union members within a struct are now properly handled as an unevaluated field in C++11 mode. This fixes PR12866.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157784
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Thu, 31 May 2012 23:32:58 +0000 (23:32 +0000)]
In TypoCorrectionConsumer, BestResults to CorrectionResults to lessen
the confusion among all of the uses of Best* in relation to the set of
possible typo correction results. Also add a method to return the set of
typo corrections that have the single best edit distance--it returns the
second half of the first pair in TypoEditDistanceMap (with
getBestEditDistance already returning the first half).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157781
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 31 May 2012 23:18:32 +0000 (23:18 +0000)]
objc: properties of NSObject attribute must
have correct pointer type or issue error,
instead of crashing in IRGen. // rdar://
11569860
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157780
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tom Care [Thu, 31 May 2012 21:24:58 +0000 (21:24 +0000)]
[analyzer] Fix BugType memory leak in IdempotentOperationChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157772
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 31 May 2012 19:27:30 +0000 (19:27 +0000)]
Updating the visualizers to include more datatypes. Patch thanks to Jay Blanchard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157763
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 31 May 2012 18:07:55 +0000 (18:07 +0000)]
[analyzer] Cleanup for r157721.
We should lock the number of elements after the initial parsing is
complete. Recursive AST visitors in AnalyzesConsumer and CallGarph can
trigger lazy pch deserialization resulting in more calls to
HandleTopLevelDecl and appending to the LocalTUDecls list. We should
ignore those.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Thu, 31 May 2012 17:58:43 +0000 (17:58 +0000)]
Fix an object lifetime issue in clang/Tooling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 31 May 2012 06:03:17 +0000 (06:03 +0000)]
Allow some BugReports to opt-out of PathDiagnostic callstack pruning until we have significantly
improved the pruning heuristics. The current heuristics are pretty good, but they make diagnostics
for uninitialized variables warnings particularly useless in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 31 May 2012 05:18:48 +0000 (05:18 +0000)]
Add builtin for pclmulqdq instruction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157733
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 30 May 2012 23:55:51 +0000 (23:55 +0000)]
Only visit default arguments for template declarations when visiting the template declaration which introduced them. Patch by Yang Chen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 30 May 2012 23:14:52 +0000 (23:14 +0000)]
Change wording of 'memcpy' type mismatch warning and remove fixit.
As per comments following r157659.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 30 May 2012 23:14:48 +0000 (23:14 +0000)]
[analyzer]Fix another occurrence of iterator invalidation (LocalTUDecls)
Follow up in r155693, r155680.
Prevents a hard to reproduce crash with the following stack trace:
3 libsystem_c.dylib 0x00007ff55a835050 _sigtramp +
18446744029881443184
4 clang 0x0000000106218e97 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
+ 519
5 clang 0x0000000105cf3002 clang::ParseAST(clang::Sema&,
bool, bool) + 690
6 clang 0x00000001059a41d8
clang::ASTFrontendAction::ExecuteAction() + 312
7 clang 0x00000001059a3df7 clang::FrontendAction::Execute()
+ 231
8 clang 0x00000001059b0ecc
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 860
9 clang 0x000000010595e451
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 961
10 clang 0x0000000105947f29 cc1_main(char const**, char
const**, char const*, void*) + 969
11 clang 0x0000000105958259 main + 473
12 clang 0x0000000105947b34 start + 52
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157721
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 30 May 2012 22:41:32 +0000 (22:41 +0000)]
Add a test for '%@' suggestion for classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157718
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 30 May 2012 21:53:13 +0000 (21:53 +0000)]
Suggest '%@' for Objective-C objects in ObjC format strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157716
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 30 May 2012 20:45:14 +0000 (20:45 +0000)]
Disable -Wunique-enum for anonymous enums.
This is a large class of false positives where anonymous enums are used to
declare constants (see Clang's Diagnostics.h for example). A small number of
true positives could probably be found in this bucket by still warning if the
anonymous enum is used in a declarator (enum { ... } x;) but so far we don't
believe this to be a source of significant benefit so I haven't bothered to
preserve those cases.
General offline review/acknowledgment by rtrieu.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 30 May 2012 18:18:29 +0000 (18:18 +0000)]
TableGen: Remove extraneous '\' at EOL in generated tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 May 2012 17:33:54 +0000 (17:33 +0000)]
objective-c: revert r157407. It broke a project
and reported as PR12959. // rdar://
11499742
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157697
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Wed, 30 May 2012 16:04:29 +0000 (16:04 +0000)]
Adds a toString method to Replacement, which helps debugging.
Adds missing header guards to Refactoring.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157694
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 30 May 2012 12:10:28 +0000 (12:10 +0000)]
Fixed a memory leak in clang/Tooling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157687
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 May 2012 09:56:26 +0000 (09:56 +0000)]
supply a simple-minded testcase for r156813, to check whether the embedded montavista gcc toolchain is recognized
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 30 May 2012 06:55:10 +0000 (06:55 +0000)]
Clang docs update: list command-line flags that control the size of generated debug information. Reviewed by chandlerc@ and echristo@.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157681
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 30 May 2012 05:54:54 +0000 (05:54 +0000)]
SSE4A should not imply LZCNT and POPCNT. FMA4 should imply SSE4A. Add missing break at the end of btver1 feature list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157680
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 30 May 2012 04:49:49 +0000 (04:49 +0000)]
Update FIXME. ABM is already covered by LZCNT and POPCNT.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157676
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 30 May 2012 04:45:24 +0000 (04:45 +0000)]
Mark extrqi and insertqi immediate arguments as being ICE.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157675
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 30 May 2012 04:30:08 +0000 (04:30 +0000)]
Test commit - Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 30 May 2012 01:14:28 +0000 (01:14 +0000)]
Remove some extra braces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157667
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Wed, 30 May 2012 01:01:11 +0000 (01:01 +0000)]
Add new -Wunique-enum which will warn on enums which all elements have the
same value and were initialized with literals. Clang will warn on code like
this:
enum A {
FIRST = 1,
SECOND = 1
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157666
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 30 May 2012 00:34:21 +0000 (00:34 +0000)]
Add fixits for memory access warnings.
Also, do not display the builtin name and macro expansion when the
function is a builtin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157659
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 29 May 2012 21:52:45 +0000 (21:52 +0000)]
objc: position of 'fixit' was off by one.
This patch fixes it. // rdar://
11488351
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157646
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 29 May 2012 19:59:25 +0000 (19:59 +0000)]
fixes radar no. in this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157642
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 29 May 2012 19:56:01 +0000 (19:56 +0000)]
objective-c: fix a sema and IRGen crash when property
getter result type is safe but does not match with property
type resulting in spurious warning followed by crash in
IRGen. // rdar://
11515196
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157641
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 29 May 2012 19:36:17 +0000 (19:36 +0000)]
Install ammintrin.h in the cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157639
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 29 May 2012 19:10:17 +0000 (19:10 +0000)]
Add an ammintrin.h header for SSE4a intrinsics.
This is a clean-room implementation based on public documentation and
I tried to validate it as much as possible against gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157638
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Tue, 29 May 2012 19:07:33 +0000 (19:07 +0000)]
MIPS: Pass -KPIC argument to MIPS assembler if necessary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Tue, 29 May 2012 18:50:33 +0000 (18:50 +0000)]
Factor out the code retrieves the last PIC related argument from
the Clang::ConstructJob() to the new ArgList::getLastArg() routine
with eight argument. That simplifies reusing of this code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157633
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 29 May 2012 17:48:39 +0000 (17:48 +0000)]
Define __SSE4A__ when targeting new AMD CPUs.
This doesn't really fit the existing SSELevel so it gets an extra flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157630
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 29 May 2012 17:05:42 +0000 (17:05 +0000)]
Fix indenting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157628
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 29 May 2012 16:57:50 +0000 (16:57 +0000)]
Revert r155737, restoring the MaxDepth in the BalancedDelimiterTracker to 256.
r155737 turned out to be a temporary work around. The correct fix was in r155823.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157627
91177308 -0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Tue, 29 May 2012 16:10:50 +0000 (16:10 +0000)]
Sparc is bigendian.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157626
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 29 May 2012 08:10:34 +0000 (08:10 +0000)]
Make Clang driver pass the last option from -g group to the compiler.
Leave a better fixme for different debug info flags
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157602
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Tue, 29 May 2012 07:01:45 +0000 (07:01 +0000)]
Use fewer temporaries mangling APSInt objects. The performance difference
is negligible, but it makes the code clearer. Based on a suggestion by
Jordy Rose.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157601
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 29 May 2012 00:35:18 +0000 (00:35 +0000)]
OpenCL: Fix vector conditional operator CodeGen for the case where
the operands are vectors of doubles.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157596
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 28 May 2012 21:01:59 +0000 (21:01 +0000)]
Fix suspicous isIntegerType() check, found by PVS Studio (PR12357).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157593
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 May 2012 19:38:42 +0000 (19:38 +0000)]
Address minor FIXME in RedeclLink to contain a PointerIntPair instead of derive from it.
Use actual factory functions rather than derived classes acting as named constructors/factories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157588
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Mon, 28 May 2012 16:53:33 +0000 (16:53 +0000)]
Fix mangling of integral template arguments between 1 and 10. Add a test case
for this. Reported by Timur Iskhodzhanov.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Mon, 28 May 2012 03:54:22 +0000 (03:54 +0000)]
Fix Lang's fix. This should fix the tests for +Asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 May 2012 01:47:53 +0000 (01:47 +0000)]
adjust to mainline llvm API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157557
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 28 May 2012 01:26:45 +0000 (01:26 +0000)]
Fix PR12960 by not attempting to correct cases when we're not actually instantiatiating a template.
This comes up in the begin/end calls of a range-for (see the included test
case). Other suggestions are welcome, though this seems to do the trick without
regressing anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157553
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Mon, 28 May 2012 00:43:56 +0000 (00:43 +0000)]
Test case for 157547. Before that patch, all the digits would be mangled
as zeroes. Now the digits are properly non-zero.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 May 2012 22:41:08 +0000 (22:41 +0000)]
PR12962: Fix a rare use after free when collecting virtual overrides.
The DenseMap reallocates after 64 insertions so this only happened in
large test cases under very specific circumstances.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 27 May 2012 21:39:49 +0000 (21:39 +0000)]
Fix call to APSInt constructor - it doesn't take an initial value, just a
bitwidth and signedness. Also rename the variable to reflect its purpose.
No test case - discovered during random code exploration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sun, 27 May 2012 16:59:48 +0000 (16:59 +0000)]
-Wdeprecated warning to include reference (as a note)
to the declaration in this patch. // rdar://
10893232
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157537
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 May 2012 15:32:10 +0000 (15:32 +0000)]
Pass ProgramStateRef by reference.
Retain + Release on a ref counted pointer is cheap, but not free (it adds a function call in this case).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 27 May 2012 14:08:44 +0000 (14:08 +0000)]
Close HTML tag properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 May 2012 13:28:52 +0000 (13:28 +0000)]
Use the SelectorSet typedef more widely throughout Sema.
While there make it a SmallPtrSet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 May 2012 13:28:44 +0000 (13:28 +0000)]
Replace some custom hash combines with the standard stuff from DenseMapInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157531
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 27 May 2012 13:10:14 +0000 (13:10 +0000)]
clang/unittests/Tooling/RewriterTestContext.h: Don't try to remove TemporaryDirectory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157530
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 27 May 2012 12:59:58 +0000 (12:59 +0000)]
clang/lib/Rewrite/Rewriter.cpp: Don't try to rename opened files on Win32. Win32 doesn't allow rename/removing opened files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sat, 26 May 2012 23:12:19 +0000 (23:12 +0000)]
Mangle template instantiations properly (as of VC 7.x) when compiling for
the Microsoft Visual C++ ABI. Currently limited to type and integral
non-type arguments. Based on a patch by Timur Iskhodzhanov!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 26 May 2012 19:39:52 +0000 (19:39 +0000)]
Only emit one set of braces for __VERSION__, getClangFullRepositoryVersion already adds some.
No test as the output is highly dependend on the local configuration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 26 May 2012 16:10:06 +0000 (16:10 +0000)]
Change warning to error when property setter names conflict.
// rdar://
11528439
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 26 May 2012 06:20:46 +0000 (06:20 +0000)]
In response to some discussions on IRC, tweak the wording of the new
-Wsometimes-uninitialized diagnostics to make it clearer that the cause
of the issue may be a condition which must always evaluate to true or
false, rather than an uninitialized variable.
To emphasize this, add a new note with a fixit which removes the
impossible condition or replaces it with a constant.
Also, downgrade the diagnostic from -Wsometimes-uninitialized to
-Wconditional-uninitialized when it applies to a range-based for loop,
since the condition is not written explicitly in the code in that case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157511
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 26 May 2012 05:35:39 +0000 (05:35 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157510
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Sat, 26 May 2012 00:49:15 +0000 (00:49 +0000)]
Don't offer '[[clang::fallthrough]];' fix-it when a fall-through occurs to a
switch label immediately followed by a 'break;'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157508
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 25 May 2012 21:45:08 +0000 (21:45 +0000)]
fix codegen support for alloc_size attribute for static C++ methods
add test case for C++ codegen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157500
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 25 May 2012 20:05:57 +0000 (20:05 +0000)]
[libclang] Add a test I forgot to commit for r156890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 May 2012 17:22:33 +0000 (17:22 +0000)]
Don't ignore linkage when ignoring visibility in the instantiation of a
method template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157486
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 25 May 2012 17:04:42 +0000 (17:04 +0000)]
add CodeGen support for the alloc_size attribute
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157483
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 May 2012 16:41:35 +0000 (16:41 +0000)]
Don't ignore linkage when ignoring visibility in the instantiation of a
function template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157480
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 25 May 2012 16:02:16 +0000 (16:02 +0000)]
[analyzer] Don't crash on LValBitCast
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 May 2012 15:51:26 +0000 (15:51 +0000)]
Consider the linkage for member class templates even when we have to ignore
the visibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 May 2012 14:47:05 +0000 (14:47 +0000)]
When ignoring visibility in an instantiation, still consider the linkage.
Similar fixes for function and member template to follow as I write the
testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 25 May 2012 14:17:45 +0000 (14:17 +0000)]
Whitespace fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157469
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Fri, 25 May 2012 08:39:21 +0000 (08:39 +0000)]
Links the entry point to the tooling documentation into clang's menu bar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157462
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 25 May 2012 02:35:34 +0000 (02:35 +0000)]
Release notes update for -Wsometimes-uninitialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 25 May 2012 02:17:09 +0000 (02:17 +0000)]
Split a chunk of -Wconditional-uninitialized warnings out into a separate flag,
-Wsometimes-uninitialized. This detects cases where an explicitly-written branch
inevitably leads to an uninitialized variable use (so either the branch is dead
code or there is an uninitialized use bug).
This chunk of warnings tentatively lives within -Wuninitialized, in order to
give it more visibility to existing Clang users.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157458
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 25 May 2012 01:13:50 +0000 (01:13 +0000)]
[analyzer] Loading external plugins with scan-build
Load custom plugins when running scan-build. This is useful when
additional static analysis Checkers must be provided via clang's plugin
interface.
Loading additional plugins can now be done via the scan-build call:
scan-build -load-plugin <plugin.so>
A patch by Thomas Hauth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Seth Cantrell [Fri, 25 May 2012 00:03:29 +0000 (00:03 +0000)]
ensure value passed to is space is representable as unsigned char
if the value isn't an unsigned char or EOF behavior is undefined
(and on Windows there's an assertion)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 24 May 2012 23:45:35 +0000 (23:45 +0000)]
Some cleanups around the uninitialized variables warning, and a FIXME. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 24 May 2012 22:59:56 +0000 (22:59 +0000)]
cleanup some code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 24 May 2012 22:48:38 +0000 (22:48 +0000)]
objective-c: warn on use of property setters
backing two propeties because proprty names
match except for first letter being of different
case. // rdar://
11528439 , [PR12936].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 24 May 2012 22:36:31 +0000 (22:36 +0000)]
Get rid of some non-ASCII en-dashes that crept in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 24 May 2012 22:04:19 +0000 (22:04 +0000)]
Implement the C++11 discarded value expression rules for volatile lvalues. <rdar://problem/
10790820 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 24 May 2012 21:39:33 +0000 (21:39 +0000)]
Un-XFAIL CodeGen/builtins-nvptx.c now that the proper changes have
landed in LLVM core
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 24 May 2012 21:05:41 +0000 (21:05 +0000)]
A minor tweak to the new volatile lvalue warning: don't warn on "(void)x", where "x" refers to a local variable. This should silence a useless warning in compiler-rt and other places.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157414
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 24 May 2012 20:58:21 +0000 (20:58 +0000)]
XFAIL this test, which does not pass on trunk since the grand
renaming in r157403.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 May 2012 20:16:00 +0000 (20:16 +0000)]
Set svn:keywords property to Id
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157412
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 May 2012 20:13:47 +0000 (20:13 +0000)]
New & improved man page attached, now with standard license added.
Plus, a patch for scan-build.
* mdoc corrections
* slightly more compact output
* same license as scan-build
* DESCRIPTION describes
* Default checkers corrected & explained
* Authors credited
The patch adds support for --help-checkers. It just lists the default
checkers by recursively invoking "scan-build -h" and looking for the
magic '+' signs.
Patch by James Lowden!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157411
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 24 May 2012 18:29:41 +0000 (18:29 +0000)]
objective-c: Fixes a corner case and interesting bug.
Where diagnostic about unfound property is not
issued in the context where a setter is looked up
in situation in which name and property name differ
in their first letter case. // rdar://
11363363
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 24 May 2012 17:49:22 +0000 (17:49 +0000)]
[objcmt] Add test case for r157395.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157404
91177308 -0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 24 May 2012 17:43:12 +0000 (17:43 +0000)]
Replace PTX back-end with NVPTX back-end in all places where Clang cares
NV_CONTRIB
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 24 May 2012 17:31:59 +0000 (17:31 +0000)]
[analyzer] Minor cleanup to checkers' help text.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157402
91177308 -0d34-0410-b5e6-
96231b3b80d8