summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Look through chains of 'x = y = z' when employing silencing heuristics in ↵Ted Kremenek2012-04-041-8/+30
| | | | | | | | the DeadStoresChecker. Fixes <rdar://problem/11185138>. llvm-svn: 154040
* modern objc translator. Add moreFariborz Jahanian2012-04-041-4/+9
| | | | | | | 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-0418-61/+131
| | | | | | | | 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-044-100/+100
| | | | | | | | | | 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
* 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-041-1/+2
| | | | | | | | 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
* Adds a tooling library.Manuel Klimek2012-04-046-1/+543
| | | | | | | | | | | | | | | 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
* For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this isRichard Smith2012-04-048-7/+31
| | | | | | | | | | 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-041-8/+14
| | | | | | | | | | | | | | | | | 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-041-1/+2
| | | | | | 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-041-7/+11
| | | | | | | | | | | | | 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-041-0/+2
| | | | | | | | 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-042-1/+21
| | | | | | | statement-expressions. Prevents cleanups and such from being claimed by the first full-expression in the block. llvm-svn: 153989
* 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
* Remove dead assignment to local variable.Ted Kremenek2012-04-044-5/+0
| | | | llvm-svn: 153985
* Add feature check "cxx_local_type_template_args" describing supportDouglas Gregor2012-04-041-0/+2
| | | | | | | for templates with local template arguments, from Michel Morin! Fixes PR12337. llvm-svn: 153983
* Eliminate obvious use-after-free. Fixes PR12433 / <rdar://problem/11168333>.Douglas Gregor2012-04-041-1/+1
| | | | llvm-svn: 153982
* Remove more redundant lookups. Add a new "all_lookups_iterator" which providesNick Lewycky2012-04-032-24/+7
| | | | | | | | a view over the contents of a DeclContext without exposing the implementation details of the StoredDeclsMap. Use this in LookupVisibleDecls to find the visible declarations. Fixes PR12339! llvm-svn: 153970
* Don't treat synthesized ivars as being in the base class for the purpose ofNick Lewycky2012-04-031-5/+5
| | | | | | looking up visible decls. llvm-svn: 153967
* Replace the workaround from r153445 with a proper fix.Kaelyn Uhrain2012-04-032-15/+7
| | | | | | | | | | | | | Infinite recursion was happening when DiagnoseInvalidRedeclaration called ActOnFunctionDeclarator to check if a typo correction works when the correction was just to the nested-name-specifier because the wrong DeclContext was being passed in. Unlike a number of functions surrounding typo correction, the DeclContext passed in for a function is the context of the function name after applying any nested name specifiers, not the lexical DeclContext where the function+nested-name-specifier appears. llvm-svn: 153962
* modern objective-c translator: rewriter linkage spec.Fariborz Jahanian2012-04-031-0/+24
| | | | | | // rdar://11169733 llvm-svn: 153960
* Correct handling of _Pragma macro inside a macro argument.Argyrios Kyrtzidis2012-04-033-5/+66
| | | | | | | | | | | | | | | | If we are pre-expanding a macro argument don't actually "activate" the pragma at that point, activate the pragma whenever we encounter it again in the token stream. This ensures that we will activate it in the correct location or that we will ignore it if it never enters the token stream, e.g: \#define EMPTY(x) \#define INACTIVE(x) EMPTY(x) INACTIVE(_Pragma("clang diagnostic ignored \"-Wconversion\"")) This also fixes the crash in rdar://11168596. llvm-svn: 153959
* [analyzer] Record the basic blocks covered by the analyzes run.Anna Zaks2012-04-036-7/+68
| | | | | | | | Store this info inside the function summary generated for all analyzed functions. This is useful for coverage stats and can be helpful for analyzer state space search strategies. llvm-svn: 153923
* Add more constraint registers for mips.Eric Christopher2012-04-031-0/+3
| | | | | | Patch by Jack Carter. Testcase cleanup by me. llvm-svn: 153921
* Change location information for synthesized properties to be at theEric Christopher2012-04-032-7/+8
| | | | | | | | | | | | | | | | | | property file/line rather than the @synthesize file/line. Avoids some nasty confusing-ness with conflating the file from the scope and the line from the original declaration. Use the current scope location as a separate parameter so that we can match it up better in the line table with the beginning of the scope. Update a couple of testcases accordingly since I had to change that we actually use the passed in location in EmitFunctionStart and for the new metadata parameter and add a new testcase to make sure we've got the right line numbers for synthesized properties. Part of rdar://11026482 llvm-svn: 153917
* Fix another false positive in RegionStore involving doing loads from ↵Ted Kremenek2012-04-031-7/+18
| | | | | | | | | symbolic offsets. We still don't properly reason about such accesses, but we shouldn't emit bogus "uninitialized value" warnings either. Fixes <rdar://problem/11127008>. llvm-svn: 153913
* Fix potential null dereference in the static analyzer when inlining a call ↵Ted Kremenek2012-04-021-4/+5
| | | | | | that has already been inlined. Unfortunately I have no test case. llvm-svn: 153900
* PR10217 diagnostic fix: don't say 'copy constructor' when we meanRichard Smith2012-04-021-1/+1
| | | | | | 'copy assignment operator'. llvm-svn: 153897
* Remove windows line endings.David Blaikie2012-04-021-105/+105
| | | | llvm-svn: 153895
* Finish PR10217: Ensure we say that a special member was implicitly, notRichard Smith2012-04-023-22/+28
| | | | | | explicitly, deleted in all relevant cases, and explain why. llvm-svn: 153894
* Correct error recovery when missing 'class' in a template template parameter.David Blaikie2012-04-021-6/+11
| | | | | | | | | | | | | | | | | The diagnostic message correctly informs the user that they have omitted the 'class' keyword, but neither suggests this insertion as a fixit, nor attempts to recover as if they had provided the keyword. This fixes the recovery, adds the fixit, and adds a separate diagnostic and corresponding replacement fixit for cases where the user wrote 'struct' or 'typename' instead of 'class' (suggested by Richard Smith as a possible common mistake). I'm not sure the diagnostic message for either the original or new cases feel very Clang-esque, so I'm open to suggestions there. The fixit hints make it fairly easy to see what's required, though. llvm-svn: 153887
* Silence -Wunused-variable in -Asserts buildMatt Beaumont-Gay2012-04-021-0/+1
| | | | llvm-svn: 153885
* PR12438: Profile a reference to a type template parameter by depth and index,Richard Smith2012-04-021-0/+8
| | | | | | | not by canonical decl. This only matters for sizeof...(Pack) expressions; in all other cases, we'd profile it as a type instead. llvm-svn: 153884
* Implement DR1402: if a field or base class is not movable, the derived class'sRichard Smith2012-04-022-43/+141
| | | | | | | | | | | move constructor/move assignment operator are not declared, rather than being defined as deleted, so move operations on the derived class fall back to copying rather than moving. If a move operation on the derived class is explicitly defaulted, the unmovable subobject will be copied instead of being moved. llvm-svn: 153883
* Use -rewrite-legacy-objc as clang argument for translating Fariborz Jahanian2012-04-023-0/+6
| | | | | | | objective-c's fragile abi, Use -rewrite-objc for translating objective-c's modern abi. // rdar://11143173 llvm-svn: 153877
* Basic semantic analysis support for inheriting constructor declarations inRichard Smith2012-04-023-13/+19
| | | | | | dependent contexts. llvm-svn: 153858
* Ignore unused --serialize-diagnostics option when using llvm-gcc.Bob Wilson2012-04-011-0/+3
| | | | | | | | | llvm-gcc doesn't handle --serialize-diagnostics so when compiling i386 kernel/kext code with -Werror, you get an error about that option being unused. Claim the argument to prevent this from breaking builds. <rdar://problem/11161933> llvm-svn: 153854
* Properly handle explicit constructors in list-initialization. Fixes PR12120.Sebastian Redl2012-04-011-2/+27
| | | | llvm-svn: 153849
* Analyzer: Store BugReports directly in a ilist instead of adding another ↵Benjamin Kramer2012-04-014-18/+13
| | | | | | layer of inderection with std::list llvm-svn: 153847
* Fixed MacroInfo definition range for function like macros with empty body.Abramo Bagnara2012-03-311-3/+2
| | | | llvm-svn: 153819
* [arcmt] When fixing the "unassigned init call" ARC error, make sureArgyrios Kyrtzidis2012-03-311-1/+5
| | | | | | | | to do a nil check for the result of the call. rdar://10950973 llvm-svn: 153793
* modern objective-c translator: writing containerFariborz Jahanian2012-03-301-1/+109
| | | | | | literals. wip. // rdar://10803676 llvm-svn: 153784
* Fix a pair of invalidation bugs when emitting protocol definitionsJohn McCall2012-03-301-2/+6
| | | | | | | in the fragile and non-fragile Mac ObjC runtimes. No useful test case. Fixes rdar://problem/11072576. llvm-svn: 153778
* Make sure we unique static-local decls across multiple emissions ofJohn McCall2012-03-303-51/+76
| | | | | | | | the function body, but do so in a way that doesn't make any assumptions about the static local actually having a proper, unique mangling, since apparently we don't do that correctly at all. llvm-svn: 153776
OpenPOWER on IntegriCloud