summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Objective-C ARC. Add support for toll-free bridge Fariborz Jahanian2014-05-102-0/+21
| | | | | | | type ,and bridge attribute, checking with static_cast. // rdar://16756639 llvm-svn: 208474
* Analyzer: Make helper function static.Benjamin Kramer2014-05-101-1/+1
| | | | llvm-svn: 208473
* Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer2014-05-1016-22/+27
| | | | | | | Required pulling LambdaExpr::Capture into its own header. No functionality change. llvm-svn: 208470
* Add FIXME describing the limitation of using column info to disambiguate ↵David Blaikie2014-05-101-0/+8
| | | | | | | | | | | | | | | | | | | | inlining. Also tidy up, simplify, and extend the test coverage to demonstrate the limitations. This test should now fail if the bugs are fixed (& hopefully whoever ends up in this situation sees the FIXMEs and realizes that the test needs to be updated to positively test their change that has fixed some or all of these issues). I do wonder whether I could demonstrate breakage without a macro here, but any way I slice it I can't think of a way to get two calls to the same function on the same line/column in non-macro C++ - implicit conversions happen at the same location as an explicit function, but you'd never get an implicit conversion on the result of an explicit call to the same implicit conversion operator (since the value is already converted to the desired result)... llvm-svn: 208468
* Stop all the Decl classes poking at Redeclarable's data member directly, and ↵Richard Smith2014-05-102-3/+3
| | | | | | make getNextRedeclaration follow the pattern of its friends getPreviousDecl and getMostRecentDecl. llvm-svn: 208467
* MS ABI: Pass 'sret' as the second parameter of instance methodsReid Kleckner2014-05-095-20/+76
| | | | | | | | | | | | | | | | | Summary: MSVC always passes 'sret' after 'this', unlike GCC. This required changing a number of places in Clang that assumed the sret parameter was always first in LLVM IR. This fixes win64 MSVC ABI compatibility for methods returning structs. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3618 llvm-svn: 208458
* Don't emit -Wnon-virtual-dtor on final classes, since it's not a problem there.David Blaikie2014-05-091-1/+2
| | | | | | | | | The base class is the culprit/risk here - a sealed/final derived class with virtual functions and a non-virtual dtor can't accidentally be polymorphically destroyed (if the base class's dtor is protected - which also suppresses this warning). llvm-svn: 208449
* PR19698, PR19674: enable __has_feature checks for cxx_generic_lambdas andRichard Smith2014-05-091-3/+8
| | | | | | | cxx_decltype_auto, and fix documentation of cxx_generic_lambdas and cxx_init_captures to specify the right feature-check name. llvm-svn: 208445
* Objective-C. Reduce false positive warnings with -Wselector by issuing warning Fariborz Jahanian2014-05-091-2/+3
| | | | | | | only when named selector is declared in TU and it is not declared in a system header. rdar://16600230 llvm-svn: 208443
* Amending r208439 to remove buildLExpr; this code isn't strictly required ↵Aaron Ballman2014-05-091-46/+0
| | | | | | yet, and fixes a dead code warning. llvm-svn: 208440
* Add the ability to use logical expressions for capability attributes. This ↵Aaron Ballman2014-05-093-1/+161
| | | | | | | | | | is to allow requirements to be expressed not just in terms of lists, but in terms of logical expressions. Eg) void foo(void) __attribute__((requires_capability((FlightControl || Worker) && !Logger))); This is WIP code. llvm-svn: 208439
* Don't leak MacroArgs when using code completion, PR19688.Nico Weber2014-05-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | MacroArgs are owned by TokenLexer, and when a TokenLexer is destroyed, it'll call its MacroArgs's destroy() method. destroy() only appends the MacroArg to Preprocessor's MacroArgCache list, and Preprocessor's destructor then calls deallocate() on all MacroArgs in that list. This method then ends up freeing the MacroArgs's memory. In a code completion context, Parser::cutOffParsing() gets called when a code completion token is hit, which changes the type of the current token to tok::eof. eof tokens aren't always ConsumeToken()ed, so Preprocessor::HandleEndOfFile() isn't always called, and that function is responsible for popping the macro stack. Due to this, Preprocessor::CurTokenLexer can be non-NULL when ~Preprocessor runs. It's a unique_ptr, so it ended up being destructed after ~Preprocessor completed, and its MacroArgs thus got added to the freelist after the code freeing things on the freelist had already completed. The fix is to explicitly call reset() before the freelist processing happens. (See the bug for more notes.) llvm-svn: 208438
* ThreadSafetyAnalysis: Don't crash when trying to analyze objc methods.Benjamin Kramer2014-05-091-4/+6
| | | | | | | | | | | The thread safety analysis isn't very useful in ObjC (you can't annotate ObjC classes or methods) but we can still analyze the actual code and show violations in usage of C/C++ functions. Fixes PR19541, which does not use thread safety attributes but crashes with -Weverything. llvm-svn: 208436
* Pacify bots again - turns out my checkout was slightly polluted when I was ↵James Molloy2014-05-091-1/+1
| | | | | | reverting a olista01s change, and this pollution made it upstream during the revert checkin :/ Sorryemacs -nw lib/CodeGen/CodeGenModule.cpp llvm-svn: 208426
* Reapply r208417 (olista01 'ARM: HFAs must be passed in consecutive ↵James Molloy2014-05-092-27/+40
| | | | | | registers'). Bots are now pacified. llvm-svn: 208425
* Revert r208417 (olista01 'ARM: HFAs must be passed in consecutive ↵James Molloy2014-05-093-41/+28
| | | | | | registers'). This is a followon commit from r208413 which broke the LLVM bots. llvm-svn: 208422
* ARM: HFAs must be passed in consecutive registersOliver Stannard2014-05-092-27/+40
| | | | | | | This is the clang counterpart to 208413, which ensures that Homogeneous Floating-point Aggregates are passed in consecutive registers on ARM. llvm-svn: 208417
* clang-format: Fix bug introduced by r208392.Daniel Jasper2014-05-099-89/+74
| | | | | | Also run clang-format over clang-format's files. llvm-svn: 208409
* clang-format: [JS] Allow up to 3 empty lines in Google's JS style.Daniel Jasper2014-05-091-1/+1
| | | | llvm-svn: 208404
* clang-format: [JS] Fix spacing in dict literals.Daniel Jasper2014-05-091-3/+6
| | | | | | | | | | Before: someVariable = {'a':[{}]}; After: someVariable = {'a': [{}]}; llvm-svn: 208403
* Permit duplicate explicit class instantiations if MSVCCompat is enabledWill Wilson2014-05-091-2/+6
| | | | llvm-svn: 208402
* Add support for partial jump scope checkingAlp Toker2014-05-093-14/+22
| | | | | | | | | | This lets us diagnose and perform more complete semantic analysis when faced with errors in the function body or declaration. By recovering here we provide more consistent diagnostics, particularly during interactive editing. llvm-svn: 208394
* [C++11] Use 'nullptr'.Craig Topper2014-05-0910-92/+93
| | | | llvm-svn: 208392
* Don't repeat function name in comment.Rafael Espindola2014-05-091-192/+149
| | | | llvm-svn: 208387
* Wrap to 80 columns, no code change.Nico Weber2014-05-091-4/+3
| | | | llvm-svn: 208386
* Don't indent in namespaces.Rafael Espindola2014-05-092-148/+145
| | | | llvm-svn: 208384
* Simplify the code a bit by using linkage predicates.Rafael Espindola2014-05-091-4/+4
| | | | llvm-svn: 208382
* Fix filename in file header comment more.Nico Weber2014-05-091-1/+1
| | | | llvm-svn: 208381
* Fix filename in file header comment.Nico Weber2014-05-091-1/+1
| | | | llvm-svn: 208380
* Don't indent inside namespaces.Rafael Espindola2014-05-093-204/+205
| | | | llvm-svn: 208377
* Use auto to avoid duplicating the type.Rafael Espindola2014-05-094-160/+145
| | | | llvm-svn: 208374
* Switch Wmodule-build to a remarkBen Langmuir2014-05-081-1/+1
| | | | | | | | | On reflection, this is better despite the missing command-line handling bits for remarks. Making this a remark makes it much clearer that this is purely informational and avoids the negative connotations of a 'warning'. llvm-svn: 208367
* Fix an outdated comment.Richard Smith2014-05-081-4/+3
| | | | llvm-svn: 208366
* [Driver] Range-based loop simplification.Simon Atanasyan2014-05-082-64/+34
| | | | llvm-svn: 208354
* Remove -Wnon-modular-includeBen Langmuir2014-05-081-2/+0
| | | | | | | | | | But keep -Wnon-modular-include-in-[framework-]module This warning is too noisy and doesn't really indicate a problem for most people. Even though it would only really affect people using -Weverything, that seems bad so remove it. llvm-svn: 208345
* CodeGen: fix code model mappingSaleem Abdulrasool2014-05-081-1/+1
| | | | | | | | Large is CodeModel::Model::Large, not CodeModel::Model::Medium. Thanks to majnemer for pointing out the typo! Its unclear how to test the mapped value in the compiler, the tests already cover the driver side. llvm-svn: 208335
* Simplify a few cast<>s.Rafael Espindola2014-05-081-9/+12
| | | | llvm-svn: 208331
* Cleanup setFunctionDefinitionAttributes.Rafael Espindola2014-05-083-15/+10
| | | | | | Use more specific type, update comments and name style. llvm-svn: 208328
* Replace virtual with override.Rafael Espindola2014-05-081-2/+2
| | | | llvm-svn: 208324
* Use more specific type.Rafael Espindola2014-05-081-2/+2
| | | | llvm-svn: 208321
* Small simplification: Reduce the use of cast<>.Rafael Espindola2014-05-081-24/+24
| | | | llvm-svn: 208320
* Fix segmentation fault when mixing -Rpass with #line.Diego Novillo2014-05-081-3/+10
| | | | | | | | | | | | | | | | | | | Summary: When using #line directives, FileManager::getFile() will return a nil entry. This triggers an assert in translateFileLineCol(). This patch handles nil FileEntry instances by emitting a note that the location could not be translated back to a SourceLocation. I don't really like this solution, but we are translating presumed locations, so some information has already been lost. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3625 llvm-svn: 208315
* Fix PR19169 [Crash on invalid attempting to specialize a template method as ↵Karthik Bhat2014-05-081-2/+11
| | | | | | | | | a template variable]. A template declaration of a template name can be null in case we have a dependent name or a set of function templates. Hence use dyn_cast_or_null instead of dyn_cast. Also improve the diagnostic emitted in this case. llvm-svn: 208313
* Use predicate function to simplify a bit.Rafael Espindola2014-05-081-2/+1
| | | | llvm-svn: 208312
* Enable standalone-debug by default on FreeBSDEd Maste2014-05-081-3/+4
| | | | | | | | | | | | It was set by default on Darwin in r198655. The same usability issues with DTrace and LLDB apply to FreeBSD, so set it by default there too. rdar://problem/15758808 http://llvm.org/pr19676 Differential Revision: http://reviews.llvm.org/D3448 llvm-svn: 208310
* clang-format: Cleanup redundant calculation of ParenLevel.Daniel Jasper2014-05-082-25/+18
| | | | | | No functional changes intended. llvm-svn: 208304
* clang-format: Initial support for try-catch.Daniel Jasper2014-05-082-0/+74
| | | | | | | | | | Most of this patch was created by Alexander Rojas in http://reviews.llvm.org/D2555 Thank you! Synced and addressed review comments. llvm-svn: 208302
* Explicitly keep track of temporaries during the consumed analysis.Manuel Klimek2014-05-081-4/+3
| | | | | | | This makes the consumed analysis less dependent on the CFG layout and fixes a bug where we wouldn't warn on an unconsumed value. llvm-svn: 208300
* Suggest fix-it ':' when '=' used in for-range-declarationIsmail Pazarbasi2014-05-082-12/+27
| | | | | | | | | | Fix for PR19176. Clang will suggest a fix-it hint for cases like: int arr[] = {1, 2, 3, 4}; for (auto i = arr) ^ : llvm-svn: 208299
* clang-format: [JS] support closures in container literals.Daniel Jasper2014-05-082-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Before: return {body: {setAttribute: function(key, val) {this[key] = val; } , getAttribute : function(key) { return this[key]; } , style : { direction: '' } } } ; After: return { body: { setAttribute: function(key, val) { this[key] = val; }, getAttribute: function(key) { return this[key]; }, style: {direction: ''} } }; llvm-svn: 208292
OpenPOWER on IntegriCloud