summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer]Malloc: refactor and report use after free by memoryAnna Zaks2012-05-182-14/+65
| | | | | | allocating functions. llvm-svn: 157037
* Another test for r157025 <rdar://problem/11460990>.Fariborz Jahanian2012-05-181-0/+13
| | | | llvm-svn: 157034
* A selector match between two Objective-C methods does *not* guaranteeDouglas Gregor2012-05-173-15/+27
| | | | | | | | that the methods have the same number of parameters, although we certainly assumed this in many places. Objective-C can be insane sometimes. Fixes <rdar://problem/11460990>. llvm-svn: 157025
* Remove trailing periods which snuck into a few diagnostic strings.Matt Beaumont-Gay2012-05-172-5/+5
| | | | llvm-svn: 157022
* In the override search for Objective-C methods, protect against ASTs that ↵Douglas Gregor2012-05-172-5/+17
| | | | | | have NULL interfaces behind a category, which can happen in invalid code. Fixes <rdar://problem/11478173>, a recent regression llvm-svn: 157021
* Drop the question mark when complaining about a non-existing -Wno- flag.Benjamin Kramer2012-05-171-1/+1
| | | | | | We're certain that it doesn't exist. llvm-svn: 157017
* Add -mno-implicit-float to the M group.Chad Rosier2012-05-171-1/+1
| | | | llvm-svn: 157014
* [arcmt] Remove the "it is not safe to remove an unused 'autorelease' ↵Argyrios Kyrtzidis2012-05-172-13/+1
| | | | | | | | | | | | | | message" ARC migration error. This is more trouble that it is worth; autoreleasing a value without holding on it is a valid use-case, we should not "punish" correct code for the minority of broken/fragile programs that depend on the behavior of -autorelease. rdar://9914061 llvm-svn: 156999
* [driver] Reword the warning message for missing value to a joined argument.Chad Rosier2012-05-171-1/+1
| | | | llvm-svn: 156993
* Added two missing const qualifiers.Abramo Bagnara2012-05-172-4/+4
| | | | llvm-svn: 156988
* CXXThisScopeRAII objects aren't free, don't compute one if it's unused.Benjamin Kramer2012-05-173-3/+3
| | | | llvm-svn: 156987
* [tsan] grammar fixesKostya Serebryany2012-05-171-3/+3
| | | | llvm-svn: 156984
* Use the argument location instead of the format string location when warningMatt Beaumont-Gay2012-05-172-9/+14
| | | | | | | | | | | | | | | | | | about argument type mismatch. This gives a nicer diagnostic in cases like printf(fmt, i); where previously the snippet just pointed at 'fmt' (with a note at the definition of fmt). It's a wash for cases like printf("%f", i); where previously we snippeted the offending portion of the format string, but didn't indicate which argument was at fault. llvm-svn: 156968
* [libclang/AST] When declaring a local class, don't neglect to set the end ↵Argyrios Kyrtzidis2012-05-162-0/+11
| | | | | | | | | | | location of the DeclStmt node, otherwise libclang will not work for anything inside that class. rdar://10837710 llvm-svn: 156966
* [driver] Remove obsolete support for -A link option. The standard -A option isChad Rosier2012-05-161-5/+2
| | | | | | | | | | | | used by the preprocessor. Apple's GCC also supported a -A option for linking. The ld man page has the following: -A basefile - Obsolete incremental load format. This option is obsolete. Nick Kledzik confirms this option is no longer needed/supported. rdar://11455614 llvm-svn: 156965
* Recover better from a missing 'typename' in a function template definition.Richard Smith2012-05-164-18/+98
| | | | | | | | Disambiguate past such a potential problem, and use the absence of 'typename' to break ties in favor of a parenthesized thingy being an initializer, if nothing else in the declaration disambiguates it as declaring a function. llvm-svn: 156963
* SmallString Visual Studio visualizer by Will Wilson.David Blaikie2012-05-161-0/+5
| | | | llvm-svn: 156959
* clang/test/Tooling: Remark as XFAIL again in 5 tests for msvc hosts.NAKAMURA Takumi2012-05-165-0/+15
| | | | | FIXME: JSON doesn't like path separator '\', on Win32 hosts. llvm-svn: 156957
* XFAIL this test on MIPS.Akira Hatanaka2012-05-161-1/+1
| | | | | | Since r156650, clang has stopped emitting byval arguments for MIPS targets. llvm-svn: 156954
* Remove unnecessary temporary.Eric Christopher2012-05-161-3/+1
| | | | llvm-svn: 156953
* Rename the driver option to -mno-implicit-float, per Eli's suggestion.Chad Rosier2012-05-164-3/+5
| | | | llvm-svn: 156950
* Add triples for test.Jordy Rose2012-05-161-2/+4
| | | | llvm-svn: 156949
* Pulls diagnostics for temp file handling into the common diagnostic kinds.Manuel Klimek2012-05-165-6/+6
| | | | llvm-svn: 156947
* [driver] Allow the driver to directly accept the -no-implicit-float option, ↵Chad Rosier2012-05-164-2/+7
| | | | | | | | | so that the generation of implicit floating point instructions can be disable for ARM. rdar://11409142 llvm-svn: 156942
* [analyzer] Fix test for PR12206, which was failing on i386.Jordy Rose2012-05-163-89/+96
| | | | llvm-svn: 156941
* Add _alignof and __builtin_alignof as aliases for __alignof inDouglas Gregor2012-05-162-22/+29
| | | | | | Microsoft mode, from Will Wilson! llvm-svn: 156940
* Tweek r156937 a bit so that the suggestions are correct.Chad Rosier2012-05-162-2/+3
| | | | llvm-svn: 156938
* Warn about -Wno-foo where foo is an unknown warning option. This is helpful Chad Rosier2012-05-163-5/+12
| | | | | | | | | | | for subtle misspellings such as -Wno-unused-command-line-arguments instead of -Wno-unused-command-line-argument. Also fix the diagnostic messages to properly handle -Wno- options. Previously, the positive version was always emitted (i.e., -Wfoo was emitted for -Wno-foo). rdar://11461500 llvm-svn: 156937
* [libclang] Properly handle @encode() in RecursiveASTVisitor and traverseArgyrios Kyrtzidis2012-05-162-5/+11
| | | | | | its type source info. Fixes indexing references inside @encode(). llvm-svn: 156936
* Move the warnings for extra semi-colons under -Wextra-semi. Also, addedRichard Trieu2012-05-169-35/+83
| | | | | | | | a warning for an extra semi-colon after function definitions. Added logic so that a block of semi-colons on a line will only get one warning instead of a warning for each semi-colon. llvm-svn: 156934
* [analyzer] Revert a regression committed in r156920.Anna Zaks2012-05-161-5/+4
| | | | | | This breaks the build with -triple i386-apple-darwin9. llvm-svn: 156932
* clang/test/Tooling: Remove XFAIL in 5 tests to unveil the real failure.NAKAMURA Takumi2012-05-165-20/+0
| | | | | | FYI, they can pass on Cygwin w/o any tweaks. llvm-svn: 156930
* clang/test/Tooling/clang-check-pwd.cpp: Add "REQUIRES: shell".NAKAMURA Takumi2012-05-161-3/+1
| | | | | | This passes on MSYS bash and Cygwin. llvm-svn: 156929
* Clean up r156925, so that we only mark the capturing DeclRefExpr of aDouglas Gregor2012-05-163-26/+35
| | | | | | | | | lambda as referring to a local in an enclosing scope if we're in the enclosing scope of the lambda (not it's function call operator). Also, turn the test into an IR generation test, since that's where the crashes occurred. Really fixes PR12746 / <rdar://problem/11465120>. llvm-svn: 156926
* Fix code generation of variables reference expressions when mixingDouglas Gregor2012-05-163-2/+24
| | | | | | | blocks and lambdas, based heavily on a patch from Meador Inge. Fixes PR12746 / <rdar://problem/11465120>. llvm-svn: 156925
* Fix ASTReader handling of ImportDecls, from Meador Inge!Douglas Gregor2012-05-164-1/+14
| | | | llvm-svn: 156923
* Use a llvm::SmallString rather than std::string for duplicate-case errorsDouglas Gregor2012-05-161-4/+6
| | | | llvm-svn: 156922
* [analyzer] Fix RUN lines for old XFAIL tests, one of which actually works.Jordy Rose2012-05-162-3/+2
| | | | llvm-svn: 156921
* [analyzer] Convert many existing tests to use clang_analyzer_eval.Jordy Rose2012-05-1611-968/+472
| | | | llvm-svn: 156920
* [analyzer] Introduce clang_analyzer_eval for regression test constraint checks.Jordy Rose2012-05-164-1/+102
| | | | | | | | | | The new debug.ExprInspection checker looks for calls to clang_analyzer_eval, and emits a warning of TRUE, FALSE, or UNKNOWN (or UNDEFINED) based on the constrained value of its (boolean) argument. It does not modify the analysis state though the conditions tested can result in branches (e.g. through the use of short-circuit operators). llvm-svn: 156919
* StringSwitchify. No functionality change.Benjamin Kramer2012-05-161-20/+13
| | | | llvm-svn: 156916
* Factor sema for attributes unavailable and deprecated into a common function.Benjamin Kramer2012-05-161-28/+13
| | | | | | No functionality change. llvm-svn: 156914
* [tsan] fix typoKostya Serebryany2012-05-161-2/+2
| | | | llvm-svn: 156912
* Clarify how libstdc++ and other bits of the system toolchain are foundChandler Carruth2012-05-161-9/+6
| | | | | | | | on Linux in the getting started documentation. Patch by Nathan Ridge. llvm-svn: 156911
* [tsan] first version of ThreadSanitizer docsKostya Serebryany2012-05-161-0/+125
| | | | llvm-svn: 156910
* [tsan] add ThreadSanitizer linker flags on Linux and also copy the tsan-rt ↵Kostya Serebryany2012-05-162-1/+23
| | | | | | into the appropriate place at build time llvm-svn: 156906
* Produce more useful 'duplicate case' diagnostics. Fixes PR9243, from Terry Long!Douglas Gregor2012-05-163-3/+55
| | | | llvm-svn: 156904
* Include the correct conversion context locations for condition expressions.David Blaikie2012-05-164-7/+22
| | | | | | | | | | | | | This improves the conversion diagnostics (by correctly pointing to the loop construct for conversions that may've been caused by the contextual conversion to bool caused by a condition expression) and also causes the NULL conversion warnings to be correctly suppressed when crossing a macro boundary in such a context. (previously, since the conversion context location was incorrect, the suppression could not be performed) Reported by Nico Weber as feedback to r156826. llvm-svn: 156901
* Fix the visibility of instantiations of static data members.Rafael Espindola2012-05-162-2/+24
| | | | | | Fixes pr12835. llvm-svn: 156897
* [libclang/AST] Index references of protocols in "@protocol(...)" syntax.Argyrios Kyrtzidis2012-05-167-6/+21
| | | | | | | | | To do that, keep track of the location of the protocol id in the ObjCProtocolExpr AST node. rdar://11190837 llvm-svn: 156890
OpenPOWER on IntegriCloud