summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Use getPredefinesFileID() appropriately.Douglas Gregor2013-04-031-2/+2
| | | | | | Thanks to Argyrios for the pointer. llvm-svn: 178616
* Refactor the Get* functions to be more consistant among themselves.Richard Trieu2013-04-031-22/+23
| | | | llvm-svn: 178613
* Do not assume the template argument is an integer only because theRichard Trieu2013-04-032-2/+6
| | | | | | | | | | expressions are integer. It can also be ValueDecl expressions Use the type information from the TemplateParameterList instead Patch by Olivier Goffart! llvm-svn: 178611
* Fix a crasher in Template Diffing.Richard Trieu2013-04-032-1/+41
| | | | | | | | | | When support was added for declaration arguments, the case of variadic declaration arguments was not supported. This patch fixes that problem by not crashing when certain ValueDecl's are null. Patch by Olivier Goffart! llvm-svn: 178610
* Fix a crasher in Template Diffing.Richard Trieu2013-04-032-51/+102
| | | | | | | | | | | | Value depenedent expressions for default arguments cannot be evaluated. Instead, use the desugared template type to get an argument expression that can be used. This is needed for both integer and declaration arguements. Also, move this common code into a separate function. Patch by Olivier Goffart! llvm-svn: 178609
* Move this file into the correct directory.Eric Christopher2013-04-031-0/+0
| | | | llvm-svn: 178607
* From PR9121 gcc defaulted to omitting the frame pointer on linux,Eric Christopher2013-04-032-34/+39
| | | | | | | | however, it doesn't do that unless we're optimizing. Change that and haul out to a helper function. Also make this a driver test appropriate rather than an assembly test. llvm-svn: 178606
* Escape more @ signs in Doxygen comments.Jordan Rose2013-04-034-8/+12
| | | | | | | | | | Doxygen treats "@command" the same as "\command" in a doc comment, so whenever we talk about Objective-C things like "@interface" we have to make sure to escape them. Let's try to keep Clang -Wdocumentation-clean! llvm-svn: 178603
* [analyzer] Better model for copying of array fields in implicit copy ctors.Jordan Rose2013-04-035-38/+288
| | | | | | | | | | | | - Find the correct region to represent the first array element when constructing a CXXConstructorCall. - If the array is trivial, model the copy with a primitive load/store. - Don't warn about the "uninitialized" subscript in the AST -- we don't use the helper variable that Sema provides. <rdar://problem/13091608> llvm-svn: 178602
* In ObjC++ on legacy runtimes, push an EH cleanup as well asJohn McCall2013-04-033-3/+86
| | | | | | | | | | | | a normal cleanup when entering a @try or @synchronized to ensure that we clean that up if an exception is triggered. Apparently GCC did this, so it's hard to argue that we shouldn't do at least as much. rdar://12364847 llvm-svn: 178599
* Objective-C arc [qui]. Don't issue the bridge castFariborz Jahanian2013-04-023-16/+19
| | | | | | | | warning when doing a __bride cast in non-arc mode (which has no retain count effect). // rdar://13514210 llvm-svn: 178592
* Silencing warnings in MSVC due to duplicate identifiers.Aaron Ballman2013-04-021-2/+2
| | | | llvm-svn: 178591
* Revert "Revert r178079, it caused PR15637."Eric Christopher2013-04-024-42/+32
| | | | | | | | This reverts commit r178497 since the backend has been fixed. Also add a test to ensure that we're emitting template information for unions. llvm-svn: 178587
* Update assertion string to new name of ArithAssignBinaryOperatorStefanus Du Toit2013-04-021-1/+1
| | | | llvm-svn: 178572
* [ms-inline asm] Test case for r178566.Chad Rosier2013-04-021-0/+26
| | | | llvm-svn: 178568
* If a defaulted special member is implicitly deleted, check whether it'sRichard Smith2013-04-023-9/+59
| | | | | | | overriding a non-deleted virtual function. The existing check for this doesn't catch this case, because it fires before we mark the method as deleted. llvm-svn: 178563
* Objective-C: Provide fixit hints when warningFariborz Jahanian2013-04-028-10/+98
| | | | | | | | about 'isa' ivar being explicitely accessed when base is a user class object reference. // rdar://13503456 llvm-svn: 178562
* Remove dead store.Richard Smith2013-04-021-3/+0
| | | | llvm-svn: 178561
* Adding a hasLocalQualifiers() AST Matcher.Edwin Vane2013-04-023-0/+43
| | | | | | Updated tests and docs. llvm-svn: 178556
* Moved fallthrough regression test to switch-implicit-fallthrough.cpp.Alexander Kornienko2013-04-022-17/+18
| | | | llvm-svn: 178554
* [ms-cxxabi] Rename enum and remove dead case per Jordan's suggestionReid Kleckner2013-04-022-21/+19
| | | | | | | The IHM_ prefix was a fairly gross abbreviation to try to hit three characters for uniqueness. llvm-svn: 178551
* [ms-cxxabi] Remove unused variableReid Kleckner2013-04-021-1/+0
| | | | llvm-svn: 178550
* [ms-cxxabi] Move MS inheritance model calculation into MemberPointerTypeReid Kleckner2013-04-023-37/+98
| | | | | | | | | | | | | | | | | Summary: This makes it possible to share code between lib/AST/MicrosoftCXXABI.cpp and lib/CodeGen/MicrosoftCXXABI.cpp. No functionality change. Also adds comments about the layout of the member pointer structs as I currently understand them. Reviewers: rjmccall CC: timurrrr, cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D590 llvm-svn: 178548
* Fixed "fallthrough annotation does not directly precede switch label" warning inAlexander Kornienko2013-04-022-0/+21
| | | | | | case when [[clang::fallthrough]]; is used in a method of a local class. llvm-svn: 178543
* Fix some inconsistent use of indentation.Daniel Jasper2013-04-022-17/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically we have always special-cased the top-level statement of an unwrapped line (the one with ParenLevel == 0) and that lead to several inconsistencies. All added tests were formatted in a strange way, for example: Before: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(); if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()) { } After: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(); if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()) { } llvm-svn: 178542
* Escape # and $ in dependency files.Benjamin Kramer2013-04-022-3/+22
| | | | | | Fixes PR15642. llvm-svn: 178540
* Remove target-specific alignment from test.Benjamin Kramer2013-04-021-6/+6
| | | | llvm-svn: 178539
* [ASan] Emit lifetime markers for local variables in ↵Alexey Samsonov2013-04-022-0/+25
| | | | | | -fsanitize=use-after-scope mode llvm-svn: 178538
* Alternative handling of comments adjacent to preprocessor directives.Alexander Kornienko2013-04-022-1/+12
| | | | | | | | | | | | | | Summary: Store comments in ScopedLineState Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D609 llvm-svn: 178537
* [analyzer] Moving cplusplus.NewDelete to alpha.* for now.Anton Yartsev2013-04-028-15/+11
| | | | llvm-svn: 178529
* Add -Wstatic-local-in-inline, which warns about using a static localJohn McCall2013-04-026-7/+79
| | | | | | | | | | | | | | variable in a C99 inline (but not static-inline or extern-inline) function definition. The standard doesn't actually say that this doesn't apply to "extern inline" definitions, but that seems like a useful extension, and it at least doesn't have the obvious flaw that a static mutable variable in an externally-available definition does. rdar://13535367 llvm-svn: 178520
* [analyzer] Teach invalidateRegions that regions within LazyCompoundVal need ↵Anna Zaks2013-04-028-76/+201
| | | | | | | | | | | | to be invalidated Refactor invalidateRegions to take SVals instead of Regions as input and teach RegionStore about processing LazyCompoundVal as a top-level “escaping” value. This addresses several false positives that get triggered by the NewDelete checker, but the underlying issue is reproducible with other checkers as well (for example, MallocChecker). llvm-svn: 178518
* un-break remaining gdb buildbot testcases.Adrian Prantl2013-04-022-0/+51
| | | | | | | Make sure we do not generate line info for debugging-related frame setup. Follow-up to r178361 / rdar://problem/12767564 llvm-svn: 178517
* [analyzer] For now, don't inline [cd]tors of C++ containers.Jordan Rose2013-04-027-8/+321
| | | | | | | | | | | | | | | | | | | | | This is a heuristic to make up for the fact that the analyzer doesn't model C++ containers very well. One example is modeling that 'std::distance(I, E) == 0' implies 'I == E'. In the future, it would be nice to model this explicitly, but for now it just results in a lot of false positives. The actual heuristic checks if the base type has a member named 'begin' or 'iterator'. If so, we treat the constructors and destructors of that type as opaque, rather than inlining them. This is intended to drastically reduce the number of false positives reported with experimental destructor support turned on. We can tweak the heuristic in the future, but we'd rather err on the side of false negatives for now. <rdar://problem/13497258> llvm-svn: 178516
* [analyzer] Cache whether a function is generally inlineable.Jordan Rose2013-04-022-67/+129
| | | | | | | | | | | | | | | Certain properties of a function can determine ahead of time whether or not the function is inlineable, such as its kind, its signature, or its location. We can cache this value in the FunctionSummaries map to avoid rechecking these static properties for every call. Note that the analyzer may still decide not to inline a specific call to a function because of the particular dynamic properties of the call along the current path. No intended functionality change. llvm-svn: 178515
* [analyzer] Use inline storage in the FunctionSummary DenseMap.Jordan Rose2013-04-022-36/+28
| | | | | | | | | | | | | The summaries lasted for the lifetime of the map anyway; no reason to include an extra allocation. Also, use SmallBitVector instead of BitVector to track the visited basic blocks -- most functions will have less than 64 basic blocks -- and use bitfields for the other fields to reduce the size of the structure. No functionality change. llvm-svn: 178514
* [analyzer] Allow suppressing diagnostics reported within the 'std' namespaceJordan Rose2013-04-025-7/+126
| | | | | | | | | | | | This is controlled by the 'suppress-c++-stdlib' analyzer-config flag. It is currently off by default. This is more suppression than we'd like to do, since obviously there can be user-caused issues within 'std', but it gives us the option to wield a large hammer to suppress false positives the user likely can't work around. llvm-svn: 178513
* Fix typo in testMatt Beaumont-Gay2013-04-011-1/+1
| | | | llvm-svn: 178510
* Use the ASYContext::getTypeSizeInChars API to cleanup some ugliness, per JohnChad Rosier2013-04-011-5/+3
| | | | | | and Jordan's suggestion. No functional change intendend. llvm-svn: 178507
* PR15633: Note that we are EnteringContext when parsing the nested nameRichard Smith2013-04-015-2/+21
| | | | | | | specifier for an enumeration. Also fix a crash-on-invalid if a non-dependent name specifier is used to declare an enum template. llvm-svn: 178502
* [arcmt] Copy the diagnostics so we don't have to worry about invaliding ↵Argyrios Kyrtzidis2013-04-011-3/+9
| | | | | | | | iterators from the diagnostic list. Should fix http://llvm.org/PR15500 llvm-svn: 178500
* R600: Handle -mcpu option v3Tom Stellard2013-04-013-0/+79
| | | | | | | | | | v2: - Add a test case v3: - Use the -### clang option in the tests llvm-svn: 178499
* R600: Add missing Southern Islands GPU to setCPU() functionTom Stellard2013-04-011-1/+1
| | | | llvm-svn: 178498
* Revert r178079, it caused PR15637.Nico Weber2013-04-013-16/+41
| | | | | | Also add a test for PR15637. llvm-svn: 178497
* Don't eagerly deserialize every templated function (and every static dataRichard Smith2013-04-013-2/+20
| | | | | | member inside a class template) when loading a PCH file or module. llvm-svn: 178496
* * Attempt to un-break gdb buildbot by emitting a lexical block end onlyAdrian Prantl2013-04-012-7/+65
| | | | | | | | when we actually end a lexical block. * Added new test for line table / block cleanup. * Follow-up to r177819 / rdar://problem/13115369 llvm-svn: 178490
* Only merge down a variable type if the previous declaration wasJohn McCall2013-04-014-11/+97
| | | | | | | | | visible. There's a lot of potential badness in how we're modelling these things, but getting this much correct is reasonably easy. rdar://13535367 llvm-svn: 178488
* Adding parenType() and innerType() AST MatchersEdwin Vane2013-04-013-0/+77
| | | | | | Updated docs and tests. llvm-svn: 178487
* Cleanup. No functional change intended.Chad Rosier2013-04-011-18/+17
| | | | llvm-svn: 178481
* Thread safety analysis: Turn on checking for non-scalar types by default.DeLesley Hutchins2013-04-011-49/+43
| | | | | | | These were previously enabled as a "beta" feature, but they have now been extensively tested. llvm-svn: 178478
OpenPOWER on IntegriCloud