summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] Change warding in a path diagnostic:Anna Zaks2012-04-051-1/+1
| | | | | | | "No method actually called because receiver is nil" -> "No method is called because receiver is nil" llvm-svn: 154077
* [analyzer] Add a coverage calculation to FunctionSummaries.Anna Zaks2012-04-051-0/+10
| | | | llvm-svn: 154076
* [analyzer] Remove redundant if statement (pointed out by Ted).Anna Zaks2012-04-051-4/+0
| | | | llvm-svn: 154075
* Improve diagnostics for invalid use of non-static members / this:Richard Smith2012-04-0513-44/+57
| | | | | | | | | | | | * s/nonstatic/non-static/ in the diagnostics, since the latter form outvoted the former by 28-2 in our diagnostics. * Fix the "use of member in static member function" diagnostic to correctly detect this situation inside a block or lambda. * Produce a more specific "invalid use of non-static member" diagnostic for the case where a nested class member refers to a member of a lexically-surrounding class. llvm-svn: 154073
* Add triples to these tests to keep them working on Windows,Richard Smith2012-04-052-2/+2
| | | | | | where wchar_t is only 16 bits wide. llvm-svn: 154072
* RelNote improvements made to -Wliteral-conversion by r141955.David Blaikie2012-04-051-1/+2
| | | | llvm-svn: 154071
* Fix assertions and wrong output from StmtPrinter's string literal printing.Richard Smith2012-04-053-7/+55
| | | | | | | | | | String literals (including unicode ones) can contain non-Unicode codepoints if they were written using \x or similar. Write those out using \x, but be careful that the following character can't be misinterpreted as part of the \x escape sequence. Convert UTF-16 surrogate pairs back to codepoints before rendering them. llvm-svn: 154069
* Enable warn_impcast_literal_float_to_integer by default.David Blaikie2012-04-058-12/+17
| | | | | | | | | | | | | | | | | This diagnostic seems to be production ready, it's just an oversight that it wasn't turned on by default. The test changes are a bit of a mixed bag. Some tests that seemed like they clearly didn't need to use this behavior have been modified not to use it. Others that I couldn't be sure about, I added the necessary expected-warnings to. It's possible the diagnostic message could be improved to make it clearer that this warning can be suppressed by using a value that won't lose precision when converted to the target type (but can still be a floating point literal, such as "bool b = 1.0;"). llvm-svn: 154068
* clang/test/Tooling/clang-check.cpp: Mark it as XFAIL also on cygwin.NAKAMURA Takumi2012-04-041-1/+2
| | | | | | It seems clang-check doesn't like gcc driver on cygming. Investigating. llvm-svn: 154066
* Allow a conversion from the empty initializer list {} to anDouglas Gregor2012-04-042-0/+19
| | | | | | | std::initializer_list<T> so long as <T> is known. This conversion has identity rank. llvm-svn: 154065
* Honor -fno-pic, -fno-PIC, -fno-pie, -fno-PIE.Nico Weber2012-04-043-1/+12
| | | | | | Review at http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120402/055759.html llvm-svn: 154064
* [driver] When using the -mfpmath= option, add an error message when trying to Chad Rosier2012-04-043-3/+15
| | | | | | | enable neonfp on a CPU that doesn't support NEON. rdar://11108618 llvm-svn: 154061
* Hardcode a triple to prevent the test failing on targets which don't support ↵Richard Smith2012-04-041-1/+1
| | | | | | __thread. llvm-svn: 154058
* Test commit to check commit access.Simon Atanasyan2012-04-041-1/+0
| | | | llvm-svn: 154056
* Implement C++11 [temp.arg.nontype]'s permission to use the address of an objectRichard Smith2012-04-045-52/+128
| | | | | | or function with internal linkage as a non-type template argument. llvm-svn: 154053
* Fix an oversight: don't run ARC optimization cleanup at -O0.Dan Gohman2012-04-041-1/+2
| | | | llvm-svn: 154052
* Whitespace.Chad Rosier2012-04-041-2/+2
| | | | llvm-svn: 154050
* [driver] Add a static helper function for handling -mfpu= to remove some codeChad Rosier2012-04-041-76/+45
| | | | | | duplication. No functional change intended. llvm-svn: 154049
* Reduce variable scope.David Blaikie2012-04-041-2/+1
| | | | llvm-svn: 154047
* [driver] Create a new -mfpmath= option, which is used to control whether clangChad Rosier2012-04-044-1/+53
| | | | | | | | | | | uses Neon instructions for single-precision FP. -mfpmath=neon is analogous to passing llc -mattr=+neonfp. -mfpmath=[vfp|vfp2|vfp3|vfp4] is analogous to passing llc -mattr=-neonfp. rdar://11108618 llvm-svn: 154046
* objc-arc: provide a warning when 'receiver' of a message is 'weak'Fariborz Jahanian2012-04-043-0/+27
| | | | | | | in arc mode and opted-in with -Wreceiver-is-weak flag. // rdar://10225276 llvm-svn: 154042
* Look through chains of 'x = y = z' when employing silencing heuristics in ↵Ted Kremenek2012-04-042-8/+52
| | | | | | | | the DeadStoresChecker. Fixes <rdar://problem/11185138>. llvm-svn: 154040
* modern objc translator. Add moreFariborz Jahanian2012-04-042-5/+10
| | | | | | | rewriter specific option to cc1 with -rewrite-objc. // rdar://11143173 llvm-svn: 154037
* Remove unused argument.Fariborz Jahanian2012-04-041-2/+2
| | | | llvm-svn: 154035
* Include the "issue context" (e.g. function or method) where a static ↵Ted Kremenek2012-04-0424-80/+251
| | | | | | | | analyzer issue occurred in the plist output. Fixes <rdar://problem/11004527> llvm-svn: 154030
* Move the computation of the lambda mangling information (manglingDouglas Gregor2012-04-048-111/+130
| | | | | | | | | | number + context) to the point where we initially start defining the lambda, so that the linkage won't change when that information is made available. Fixes the assertion in <rdar://problem/11182962>. Plus, actually mangle the context of lambdas properly. llvm-svn: 154029
* objective-c modern translation. Remove commenting outFariborz Jahanian2012-04-041-1/+4
| | | | | | of extern "C". // rdar://11169733 llvm-svn: 154025
* Simplify test a bit now that it's not actually running cc1plus.Bob Wilson2012-04-041-2/+1
| | | | llvm-svn: 154018
* clang/test/Tooling/clang-check.cpp: Mark it as XFAIL mingw,msvc for now.NAKAMURA Takumi2012-04-041-0/+3
| | | | | | It seems JSON parser doesn't like path separator '\' on Win32 hosts. llvm-svn: 154017
* Tooling.cpp: Reorder inclusions according to the conding standards.NAKAMURA Takumi2012-04-041-3/+3
| | | | llvm-svn: 154016
* Tooling.cpp: Don't refer to $ENV{PWD}. Use llvm::sys::fs instead.NAKAMURA Takumi2012-04-041-1/+3
| | | | | | $ENV{PWD} is not expected to be set on all hosts. llvm-svn: 154015
* Don't crash (assert failure) when generating blocks for C++ types with a ↵David Chisnall2012-04-042-1/+21
| | | | | | | | non-const copy constructor. This was caused by the code deciding the number of fields in the byref structure using a different test to the part of the code creating the GEPs into said structure. llvm-svn: 154013
* Updated release notes for tooling.Manuel Klimek2012-04-041-0/+5
| | | | llvm-svn: 154012
* clangFrontend depends on clangEdit.Benjamin Kramer2012-04-042-3/+3
| | | | llvm-svn: 154010
* Add the dependency on clang-check to clang-test, so clang-checkManuel Klimek2012-04-041-0/+1
| | | | | | can be integration tested. llvm-svn: 154009
* Adds a tooling library.Manuel Klimek2012-04-0419-3/+1382
| | | | | | | | | | | | | | | Provides an API to run clang tools (FrontendActions) as standalone tools, or repeatedly in-memory in a process. This is useful for unit-testing, map-reduce style applications, source transformation daemons or command line tools. The ability to run over multiple translation units with different command line arguments enables building up refactoring tools that need to apply transformations across translation unit boundaries. See tools/clang-check/ClangCheck.cpp for an example. llvm-svn: 154008
* Don't actually execute gcc during testing.Benjamin Kramer2012-04-041-2/+6
| | | | llvm-svn: 154005
* Add a testcase for svn r153854.Bob Wilson2012-04-041-0/+5
| | | | llvm-svn: 154001
* Fix diagnostic typos: "non-template arguments" vs "non-type template arguments".Richard Smith2012-04-041-4/+5
| | | | | | No test updates: we don't appear to have any test coverage for these diagnostics! llvm-svn: 154000
* For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this isRichard Smith2012-04-0414-8/+55
| | | | | | | | | | a type specifier and can be combined with unsigned. This allows libstdc++4.7 to be used with clang in c++98 mode. Several other changes are still required for libstdc++4.7 to work with clang in c++11 mode. llvm-svn: 153999
* When performing template argument deduction for an initializer list,Douglas Gregor2012-04-042-8/+30
| | | | | | | | | | | | | | | | | be sure to perform the argument type adjustments in [temp.deduct.call]p2, e.g., array decay. And, when performing these deductions in the context of 'auto', make sure that we're deducing the P' in std::initializer_list<P'> rather than the whole initializer list. Together, this makes code like for( auto s : {"Deferred", "New", "Open", "Review"}) { } work properly. llvm-svn: 153998
* Dependent-sequence initialization of a single element can be directDouglas Gregor2012-04-042-2/+15
| | | | | | list-initialization. Loosen an over-eager assertion to fix PR12453. llvm-svn: 153995
* [preprocessor] In Preprocessor::CachingLex() check whether there were more ↵Argyrios Kyrtzidis2012-04-042-8/+12
| | | | | | | | | | | | | tokens cached during the non-cached lex, otherwise we are going to drop them. Fixes a bogus "_Pragma takes a parenthesized string literal" error when expanding consecutive _Pragmas in a macro argument. Part of rdar://11168596 llvm-svn: 153994
* When computing the conversion sequence in overload resolutionJohn McCall2012-04-042-0/+17
| | | | | | | | for converting an empty list to a scalar, be sure to initialize the source and destination types so that comparison of conversion sequences will work in case there are multiple viable candidates. llvm-svn: 153993
* If something already instantiated is reinstantiated as an explicit definition,Nick Lewycky2012-04-041-1/+6
| | | | | | | | | keep the latter. No test. This was noticed when poking around something else with GDB. I'm not able to figure out a testcase that would break due to this bug. Sorry. llvm-svn: 153992
* ErrorUnsupported on array cookies in the MS C++ ABI code;John McCall2012-04-041-0/+7
| | | | | | patch by Timur Iskhodzhanov. llvm-svn: 153990
* Enter an expression evaluation context when parsingJohn McCall2012-04-044-1/+30
| | | | | | | statement-expressions. Prevents cleanups and such from being claimed by the first full-expression in the block. llvm-svn: 153989
* Fix dead store warning.Ted Kremenek2012-04-041-1/+2
| | | | llvm-svn: 153988
* Change BugReporter's usage of IsCachedDiagnostic to only impact pruning ↵Ted Kremenek2012-04-041-12/+8
| | | | | | | | diagnostics emitted to the console, and leave it up to PathDiagnosticConsumer to unique reports with the shortest path. llvm-svn: 153987
* Silence dead store warning, and fix indentation.Ted Kremenek2012-04-041-8/+9
| | | | llvm-svn: 153986
OpenPOWER on IntegriCloud