summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash in libclang if code completion is used with unknown flags.Manuel Klimek2013-07-182-1/+4
| | | | | | | Use CaptureDroppedDiagnostics to make sure that there is a diagnostic client installed when warning flags are parsed. llvm-svn: 186582
* Removed a parameter from handleAttrWithMessage to make it more consistent ↵Aaron Ballman2013-07-183-6/+11
| | | | | | with other attribute handlers, as well as other attribute error messages. Added missing test cases for the unavailable attribute, and updated the deprecated test case. llvm-svn: 186578
* Fix volatile _Complex alignment test on platforms where 64-bit floating ↵JF Bastien2013-07-181-6/+14
| | | | | | | | point isn't 64-bit aligned Add x86-64 triple, and check its datalayout. Also add some comments, and use the new CHECK-LABEL. llvm-svn: 186564
* s/BuiltinLocation/ArtificialLocation/Adrian Prantl2013-07-183-10/+10
| | | | llvm-svn: 186557
* Instead of checking against some version of "isType()" go ahead andEric Christopher2013-07-181-14/+14
| | | | | | | use the conversion to bool to check if we've managed to get a type that isn't default constructed - as we meant to in the first place. llvm-svn: 186556
* Fix a compile error caught by bb-chapuni.Adrian Prantl2013-07-181-2/+3
| | | | llvm-svn: 186555
* Fix a compile error caught by bb-chapuni.Adrian Prantl2013-07-181-1/+1
| | | | llvm-svn: 186554
* Don't generate bogus line table entries for __copy_helper_block_ andAdrian Prantl2013-07-182-3/+21
| | | | | | __destroy_helper_block_, but do generate scope information. llvm-svn: 186553
* Replace llvm::DIBuilder::DisableDebugLocations() with two RAII interfacesAdrian Prantl2013-07-183-3/+75
| | | | | | | | | | | | | inspired by CodegenFunction::LexicalScope. - NoLocation temporarily turns off debug locations altogether. This is useful for emitting instructions that should be counted towards the function prologue. - BuiltinLocation temporarily switches to an artificial debug location that has a valid scope, but no line information. This is useful when emitting compiler-generated helper functions that have no source location associated with them. llvm-svn: 186552
* Clarified documentation.Adrian Prantl2013-07-181-1/+2
| | | | llvm-svn: 186551
* Simplify logic by using the appropriate function.Adrian Prantl2013-07-181-1/+1
| | | | llvm-svn: 186550
* Add condition expression result to if and elif callbacks.John Thompson2013-07-184-15/+24
| | | | llvm-svn: 186547
* Reinstate r186040, with additional fixes and more test coverage (reverted inRichard Smith2013-07-178-33/+172
| | | | | | | | | | | | | r186331). Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186546
* 80-column fixes.Eric Christopher2013-07-171-1/+2
| | | | llvm-svn: 186542
* Even more code conformance.Robert Wilhelm2013-07-171-1/+1
| | | | llvm-svn: 186537
* MS wide bitfield error check in SemaReid Kleckner2013-07-173-7/+18
| | | | | | | | | | | | | cl.exe treats wide bitfields as an error. This patch causes them to be an error if IsMsStruct is true, as it is in straight C. Patch by Warren Hunt! Reviewers: eli.friedman Differential Revision: http://llvm-reviews.chandlerc.com/D1125 llvm-svn: 186536
* clang-format: Add space in corner case.Daniel Jasper2013-07-172-0/+8
| | | | | | | | | Before: SomeType s __attribute__((unused))(InitValue); After: SomeType s __attribute__((unused)) (InitValue); llvm-svn: 186535
* Constify Replacements parameter to applyAllReplacements.David Blaikie2013-07-172-6/+6
| | | | | | | | http://llvm-reviews.chandlerc.com/D1169 Patch by Guillaume Papin. llvm-svn: 186526
* Improve idiomatic-parentheses by checking method family instead of relying ↵Jean-Daniel Dupas2013-07-172-1/+8
| | | | | | on the selector name. llvm-svn: 186524
* SemaDeclCXX.cpp: Dissolve a ligature "fi" in comment.NAKAMURA Takumi2013-07-171-1/+1
| | | | llvm-svn: 186523
* Fixed source range of C++03 access declarations.Enea Zaffanella2013-07-176-15/+63
| | | | llvm-svn: 186522
* [analyzer] Handle C++11 member initializer expressions.Jordan Rose2013-07-172-8/+48
| | | | | | | | | Previously, we would simply abort the path when we saw a default member initialization; now, we actually attempt to evaluate it. Like default arguments, the contents of these expressions are not actually part of the current function, so we fall back to constant evaluation. llvm-svn: 186521
* [analyzer] Handle C string default values for const char * arguments.Jordan Rose2013-07-173-1/+21
| | | | | | | | | | Previously, SValBuilder knew how to evaluate StringLiterals, but couldn't handle an array-to-pointer decay for constant values. Additionally, RegionStore was being too strict about loading from an array, refusing to return a 'char' value from a 'const char' array. Both of these have been fixed. llvm-svn: 186520
* [analyzer] Treat std::initializer_list as opaque rather than aborting.Jordan Rose2013-07-174-4/+56
| | | | | | | | | | | | | | Previously, the use of a std::initializer_list (actually, a CXXStdInitializerListExpr) would cause the analyzer to give up on the rest of the path. Now, it just uses an opaque symbolic value for the initializer_list and continues on. At some point in the future we can add proper support for initializer_list, with access to the elements in the InitListExpr. <rdar://problem/14340207> llvm-svn: 186519
* Option parsing tables: remove some unnecessary #definesHans Wennborg2013-07-174-14/+4
| | | | | | Also make some strings static and add missing #undef's llvm-svn: 186518
* Improve line breaking before multi-line strings.Daniel Jasper2013-07-173-30/+39
| | | | | | | | | | | | | | | | The AlwaysBreakBeforeMultilineStrings rule does not really make sense if it does not a column gain. Before (in Google style): f( "aaaa" "bbbb"); After: f("aaaa" "bbbb"); llvm-svn: 186515
* Add TemplateArgument related matchers to the registry.Samuel Benzaquen2013-07-172-4/+16
| | | | | | | | | | | | | | Summary: Continue adding more matchers to the dynamic registry. This time, we add TemplateArgument matchers. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1166 llvm-svn: 186514
* Add CXXCtorInitializer related matchers to the dynamic matcher registry.Samuel Benzaquen2013-07-172-6/+15
| | | | | | | | | | | | Summary: Now that CXXCtorInitializer is already supported in ASTNodeKind, add CXXCtorInitializer matchers to the dynamic matcher registry. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1158 llvm-svn: 186508
* Replace TEST* with CHECK-DAG in vbtable testsTimur Iskhodzhanov2013-07-171-185/+161
| | | | llvm-svn: 186502
* [analyzer] Add very limited support for temporary destructorsPavel Labath2013-07-177-4/+84
| | | | | | | | | | | | | | | | | Summary: This patch enables ExprEndgine to reason about temporary object destructors. However, these destructor calls are never inlined, since this feature is still broken. Still, this is sufficient to properly handle noreturn temporary destructors and close bug #15599. I have also enabled the cfg-temporary-dtors analyzer option by default. Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1131 llvm-svn: 186498
* clang/test/CodeGen/volatile-complex.c: Loosen CHECKs for -Asserts.NAKAMURA Takumi2013-07-171-8/+4
| | | | llvm-svn: 186492
* Propagate alignment for _ComplexJF Bastien2013-07-174-34/+111
| | | | | | | | _Complex load/store didn't have their alignment set properly, which was visible when GCC's torture tests use volatile _Complex. Update some existing tests to check for alignment, and add a new test which also has over-aligned volatile _Complex (since the imaginary part shouldn't be overaligned, only the real part). llvm-svn: 186490
* Use the simpler is_directory.Rafael Espindola2013-07-172-4/+2
| | | | llvm-svn: 186487
* More code conformance.Fariborz Jahanian2013-07-171-1/+1
| | | | llvm-svn: 186474
* ObjectiveC migrator: When adding conforming protocol,Fariborz Jahanian2013-07-173-1/+54
| | | | | | | only add outer-most conforming protocols as adding others are redundant. llvm-svn: 186473
* Avoid breaking non-trailing block comments.Alexander Kornienko2013-07-162-1/+8
| | | | | | | | | | | | | | | | Motivating example: // column limit -------------------> void ffffffffffff(int aaaaaa /* test */); Formatting before the patch: void ffffffffffff(int aaaaaa /* test */); Formatting after the patch: void ffffffffffff(int aaaaaa /* test */); llvm-svn: 186471
* Follow coding convention in argument decl.Fariborz Jahanian2013-07-161-2/+2
| | | | llvm-svn: 186467
* Make Expr::isConstantInitializer match IRGen.Eli Friedman2013-07-167-52/+95
| | | | | | | | | | Sema needs to be able to accurately determine what will be emitted as a constant initializer and what will not, so we get accurate errors in C and accurate -Wglobal-constructors warnings in C++. This makes Expr::isConstantInitializer match CGExprConstant as closely as possible. llvm-svn: 186464
* [arcmt] Remove some dead code.Argyrios Kyrtzidis2013-07-162-28/+14
| | | | | | Patch by Rafael Espíndola. llvm-svn: 186462
* ObjectiveC migrator. If a class implements a protocol'sFariborz Jahanian2013-07-163-9/+44
| | | | | | properties, then class conforms to that protocol. llvm-svn: 186460
* Don't break line comments with escaped newlines.Alexander Kornienko2013-07-163-2/+76
| | | | | | | | | | | | | | | | | | | | Summary: These can appear when comments contain command lines with quoted line breaks. As the text (including escaped newlines and '//' from consecutive lines) is a single line comment, we used to break it even when it didn't exceed column limit. This is a temporary solution, in the future we may want to support this case completely - at least adjust leading whitespace when changing indentation of the first line. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1146 llvm-svn: 186456
* clang-format: Improve handling of unterminated string literals.Daniel Jasper2013-07-164-29/+49
| | | | | | | Before, clang-format would simply eat these as they were recognized as whitespace. With this patch, they are mostly left alone. llvm-svn: 186454
* Fix crash on complex constant zero.Eli Friedman2013-07-162-3/+6
| | | | | | Fixes <rdar://problem/14442543>. llvm-svn: 186452
* Update for llvm API change.Rafael Espindola2013-07-1610-31/+25
| | | | llvm-svn: 186448
* ObjectiveC migration: complete migrating classFariborz Jahanian2013-07-163-22/+118
| | | | | | | declaration to include list of protocols class conforms to. llvm-svn: 186443
* FileCheckize test/Driver/immediate-options.cHans Wennborg2013-07-161-6/+14
| | | | llvm-svn: 186438
* Fix formatting. No functional change.Craig Topper2013-07-161-7/+5
| | | | llvm-svn: 186437
* Revamp the formatting of C++11 braced init lists.Daniel Jasper2013-07-164-21/+34
| | | | | | | | | | | | | | The fundamental concept is: Format as if the braced init list was a function call (with parentheses replaced by braces). If there is no name/type before the opening brace (e.g. if the braced list is nested), assume a zero-length identifier just before the opening brace. This behavior is gated on a new style flag, which for now replaces the SpacesInBracedLists style flag. Activate this style flag for Google style to reflect recent style guide changes. llvm-svn: 186433
* Add more types to ASTNodeKind. Refactor common instantiation code.Samuel Benzaquen2013-07-163-107/+107
| | | | | | | | | | | | | | Summary: Add support for CXXCtorInitializer and TemplateArgument types to ASTNodeKind. This change is to support more matchers from clang/ASTMatchers/ASTMatchers.h in the dynamic layer (clang/ASTMatchers/Dynamic). Reviewers: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1143 llvm-svn: 186422
* This patch removes unused parameter allProperties and converts remainingFariborz Jahanian2013-07-163-17/+9
| | | | | | | parameters in ArrayRef'ize Sema::ActOnAtEnd to ArrayRef. Patch by Robert Wilhelm. llvm-svn: 186421
OpenPOWER on IntegriCloud