summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Bugfix for r181629:Adrian Prantl2013-05-222-3/+6
| | | | | | | | | - The return type should be a pointer to the class type. - Make the condition more specific. rdar://problem/13359718 llvm-svn: 182504
* [analyzer;alternate edges] remove puny edges on the same line that span less ↵Ted Kremenek2013-05-221-2/+70
| | | | | | | | | | | than 3 columns. These are legitimate control-flow edges, but visually they add no value. Implements <rdar://problem/13941325>. llvm-svn: 182502
* Remove unnecessary assignment.Ted Kremenek2013-05-221-2/+0
| | | | llvm-svn: 182501
* Remove unused #include <map>Reid Kleckner2013-05-221-1/+0
| | | | llvm-svn: 182500
* scan-build: use the xcodebuild specified by the user.Jordan Rose2013-05-221-9/+4
| | | | | | | | | | This is important if the user has multiple Xcodes installed on their system -- we use xcodebuild to do a version check, and therefore we need to make sure we match the actual build command. Reported by Howard Ling! llvm-svn: 182498
* [analyzer] Don't crash if a block doesn't have a type signature.Jordan Rose2013-05-223-5/+39
| | | | | | | | | | | Currently, blocks instantiated in templates lose their "signature as written"; it's not clear if this is intentional. Change the analyzer's use of BlockDecl::getSignatureAsWritten to check whether or not the signature is actually there. <rdar://problem/13954714> llvm-svn: 182497
* Use StringMap in MicrosoftMangle to resolve FIXME.Reid Kleckner2013-05-221-3/+2
| | | | llvm-svn: 182488
* Fix uninitialized access error found by valgrind.Manuel Klimek2013-05-221-0/+3
| | | | llvm-svn: 182476
* [NVPTX] Add entire list of supported builtinsJustin Holewinski2013-05-222-243/+510
| | | | llvm-svn: 182468
* Makes whitespace management more consistent.Manuel Klimek2013-05-228-285/+415
| | | | | | | | | | | | | | | | | | | | | | | | | Instead of selectively storing some changes and directly generating replacements for others, we now notify the WhitespaceManager of the whitespace before every token (and optionally with more changes inside tokens). Then, we run over all whitespace in the very end in original source order, where we have all information available to correctly align comments and escaped newlines. The future direction is to pull more of the comment alignment implementation that is now in the BreakableToken into the WhitespaceManager. This fixes a bug when aligning comments or escaped newlines in unwrapped lines that are handled out of order: #define A \ f({ \ g(); \ }); ... now gets correctly layouted. llvm-svn: 182467
* Improve clang-format's stream formatting.Daniel Jasper2013-05-222-1/+3
| | | | | | | | | | | | | | | clang-format was a bit too aggressive when trying to keep labels and values on the same line. Before: llvm::outs() << "aaaaaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: llvm::outs() << "aaaaaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 182458
* Fix function declaration behavior.Daniel Jasper2013-05-222-1/+5
| | | | | | | | | | | | | | | | | | This only affects styles that prevent bin packing. There, a break after a template declaration also forced a line break after the function name. Before: template <class SomeType, class SomeOtherType> SomeType SomeFunction(SomeType Type, SomeOtherType OtherType) {} After: template <class SomeType, class SomeOtherType> SomeType SomeFunction(SomeType Type, SomeOtherType OtherType) {} This fixes llvm.org/PR16072. llvm-svn: 182457
* Improve handling of trailing 'const'.Daniel Jasper2013-05-222-7/+26
| | | | | | | Reduce the preference for breaking before a trailing 'const' according to review comments on r182362. llvm-svn: 182455
* Cut-off clang-format analysis.Daniel Jasper2013-05-224-29/+44
| | | | | | | | | | | | | | | | If clang-format is confronted with long and deeply nested lines (e.g. complex static initializers or function calls), it can currently try too hard to find the optimal solution and never finish. The reason is that the memoization does not work effectively for deeply nested lines. This patch removes an earlier workaround and instead opts for accepting a non-optimal solution in rare cases. However, it only does so only in cases where it would have to analyze an excessive number of states (currently set to 10000 - the most complex line in Format.cpp requires ~800 states) so this should not change the behavior in a relevant way. llvm-svn: 182449
* [analyzer] Do not assert on reports ending in calls within macros.Anna Zaks2013-05-223-13/+705
| | | | | | | | | The crash is triggered by the newly added option (-analyzer-config report-in-main-source-file=true) introduced in r182058. Note, ideally, we’d like to report the issue within the main source file here as well. For now, just do not crash. llvm-svn: 182445
* Fix crash-on-invalid: only use TransformAddressOfOperand when transforming theRichard Smith2013-05-212-1/+15
| | | | | | operand of a unary address-of expression, not for *all* expressions! llvm-svn: 182436
* PR16090: C++1y: treat undeduced 'auto' as a literal type, so that constexprRichard Smith2013-05-212-0/+12
| | | | | | function templates can use it as a return type. llvm-svn: 182433
* PR16094: I should have known Obj-C init-capture disambiguation couldn't beRichard Smith2013-05-214-11/+95
| | | | | | | | | | | | | | | | | | | | | *that* easy... Try a bit harder to disambiguate. This is mostly straightforward, but for =-style initializers, we actually need to know where an expression ends: [foo = bar baz] is a message send, whereas [foo = bar + baz] is a lambda-introducer. Handle this by parsing the expression eagerly, and replacing it with an annotation token. By chance, we use the *exact same* parsing rules in both cases (except that we need to assume we're inside a message send for the parse, to turn off various forms of inapplicable error recovery). llvm-svn: 182432
* [analyzer;alternate edges] prune out extra edges to a subexpression where we ↵Ted Kremenek2013-05-211-4/+46
| | | | | | | | dive-in and out of a subexpression. Fixes <rdar://problem/13941891>. llvm-svn: 182426
* [analyzer; alternated edges] look through expressions just like Environment ↵Ted Kremenek2013-05-211-1/+3
| | | | | | does. llvm-svn: 182425
* Objective-C arc: don't count use of __weakFariborz Jahanian2013-05-215-6/+27
| | | | | | | variables when they are used in such unevaluated contexts as __typeof, etc. // rdar://13942025 llvm-svn: 182423
* Refactor places which perform contextual implicit conversions to go through aRichard Smith2013-05-2110-289/+279
| | | | | | | | | | | | | common function. The C++1y contextual implicit conversion rules themselves are not yet implemented, however. This also fixes a subtle bug where template instantiation context notes were dropped for diagnostics coming from conversions for integral constant expressions -- we were implicitly slicing a SemaDiagnosticBuilder into a DiagnosticBuilder when producing these diagnostics, and losing their context notes in the process. llvm-svn: 182406
* Debug Info: Simplify the code changed in r182403 to reduce indent & avoid a ↵David Blaikie2013-05-211-15/+14
| | | | | | duplicate lookup in the insertion case llvm-svn: 182404
* Debug Info: don't bother reinserting elements into maps we just retrieved ↵David Blaikie2013-05-211-5/+6
| | | | | | | | them from (no intended behavior change) llvm-svn: 182403
* Fix whitespaceDavid Blaikie2013-05-211-8/+6
| | | | llvm-svn: 182400
* Fix off-by-one error in clang-format's emacs integration.Daniel Jasper2013-05-211-2/+2
| | | | llvm-svn: 182395
* Fix behavior of clang-format's -cursor flag.Daniel Jasper2013-05-211-1/+1
| | | | llvm-svn: 182386
* Let clang-format move the cursor appropriately.Daniel Jasper2013-05-217-13/+82
| | | | | | | | | With this patch, clang-format will try to keep the cursor at the original code position in editor integrations (implemented for emacs and vim). This means, after formatting, clang-format will try to keep the cursor on the same character of the same token. llvm-svn: 182373
* Remove unused diagnostics.Benjamin Kramer2013-05-212-4/+0
| | | | llvm-svn: 182368
* Allow breaking before a trailing const.Daniel Jasper2013-05-212-25/+25
| | | | | | | | | | | | | | Before: void someLongFunction( int someLongParameter) const; After: void someLongFunction(int someLongParameter) const; Also slightly cleanup tests. llvm-svn: 182362
* In -ast-dump, only dump comments when dumping the actual Decl to which theyRichard Smith2013-05-214-5/+32
| | | | | | | | attach, rather than merging all comments on the declaration chain. This gives a more faithful dump, and has the side benefit of unbreaking uses of dump() from within AST deserialization (where the redeclaration chain may not be sane). llvm-svn: 182350
* [analyzer; alternate edges] optimize edges for ObjC fast enumeration loops.Ted Kremenek2013-05-211-4/+49
| | | | | | Fixes <rdar://problem/13942300>. llvm-svn: 182342
* doc. parsing. HeaderDoc documentaton allows use ofFariborz Jahanian2013-05-202-0/+11
| | | | | | | @class command on an @interface declaration. Turn off the warning for this case. // rdar://13927330 llvm-svn: 182334
* Revert r182331, these checks should be based on the target not the host.Richard Smith2013-05-202-6/+1
| | | | llvm-svn: 182333
* Move two Darwin-specific hacks into #ifdef __APPLE__. These were stat'ingRichard Smith2013-05-202-1/+6
| | | | | | nonexistent Darwin-specific files on every module build. llvm-svn: 182331
* PR14606: Debug Info for namespace aliases/DW_TAG_imported_moduleDavid Blaikie2013-05-205-13/+53
| | | | | | | | | This resolves the last of the PR14606 failures in the GDB 7.5 test suite. (but there are still unresolved issues in the imported_decl case - we need to implement optional/lazy decls for functions & variables like we already do for types) llvm-svn: 182329
* Warn on and drop dllimport attrs from variable definitionsReid Kleckner2013-05-204-5/+18
| | | | | | | AsmPrinter::EmitLinkage() does not handle dllimport linkage. The LLVM verifier should also be fixed to reject this. llvm-svn: 182320
* Objective-C [qoi]: When an class conforms to multipleFariborz Jahanian2013-05-205-0/+137
| | | | | | | | protocols that declare the same property of incompatible types, issue a warning when class implementation synthesizes the property. // rdar://13075400 llvm-svn: 182316
* Make this const since it never changes (and should never change).Eric Christopher2013-05-201-1/+1
| | | | llvm-svn: 182309
* Thread safety analysis: fix use after free bug reported by Evgeniy Stepanov.DeLesley Hutchins2013-05-201-7/+21
| | | | llvm-svn: 182305
* ReleaseNotes.rst: typoHans Wennborg2013-05-201-1/+1
| | | | llvm-svn: 182294
* Minor fix: don't crash on empty configuration file, consider empty ↵Alexander Kornienko2013-05-201-0/+2
| | | | | | configuration files invalid. llvm-svn: 182290
* ReleaseNotes: add note about ASTContext::WCharTy and WideCharTyHans Wennborg2013-05-201-0/+9
| | | | llvm-svn: 182280
* Nuke build of static ASan runtime on Mac OS - clang partAlexey Samsonov2013-05-201-1/+1
| | | | llvm-svn: 182278
* [ms-cxxabi] Look up operator delete() at every virtual dtor declaration.Peter Collingbourne2013-05-203-5/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the C++ standard requires that this lookup take place only at the definition point of a virtual destructor (C++11 [class.dtor]p12), the Microsoft ABI may require the compiler to emit a deleting destructor for any virtual destructor declared in the TU, including ones without a body, requiring an operator delete() lookup for every virtual destructor declaration. The result of the lookup should be the same no matter which declaration is used (except in weird corner cases). This change will cause us to reject some valid TUs in Microsoft ABI mode, e.g.: struct A { void operator delete(void *); }; struct B { void operator delete(void *); }; struct C : A, B { virtual ~C(); }; As Richard points out, every virtual function declared in a TU (including this virtual destructor) is odr-used, so it must be defined in any program which declares it, or the program is ill formed, no diagnostic required. Because we know that any definition of this destructor will cause the lookup to fail, the compiler can choose to issue a diagnostic here. Differential Revision: http://llvm-reviews.chandlerc.com/D822 llvm-svn: 182270
* Extend default blacklist logic to MSan and TSan.Evgeniy Stepanov2013-05-201-3/+9
| | | | llvm-svn: 182269
* Add arm_neon.h to the builtin intrinsics module map.Douglas Gregor2013-05-202-0/+16
| | | | | | Fixes <rdar://problem/13933913>. llvm-svn: 182268
* Implement __declspec(selectany) under -fms-extensionsReid Kleckner2013-05-207-1/+73
| | | | | | | | | | | | | | | | selectany only applies to externally visible global variables. It has the effect of making the data weak_odr. The MSDN docs suggest that unused definitions can only be dropped at linktime, so Clang uses weak instead of linkonce. MSVC optimizes away references to constant selectany data, so it must assume that there is only one definition, hence weak_odr. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D814 llvm-svn: 182266
* Fix broken testDouglas Gregor2013-05-201-1/+1
| | | | llvm-svn: 182264
* Add -Wincomplete-module, which detects when a header is included from a ↵Douglas Gregor2013-05-207-2/+46
| | | | | | module but isn't itself part of a module. llvm-svn: 182263
OpenPOWER on IntegriCloud