summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the parser's updating of the template depth when parsing local templates ↵Faisal Vali2013-06-081-1354/+1355
| | | | | | | | and late-parsed templates. This is a slight tweak of r180708; It avoids incrementing depth when non-template local classes nested within member templates of local classes are encountered. This patch was LGTM'd by Doug http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130506/079656.html and passed the regression tests that normally pass (i.e. excluding many Module and Index tests on Windows that fail regardless) llvm-svn: 183618
* Revert "[Sema] Make FunctionType's TSI use unadjusted argument types"Reid Kleckner2013-06-084-59/+39
| | | | | | | | | This reverts commit r183614. It broke test/Sema/block-printf-attribute-1.c on non-Windows platforms, and the fix is not trivial. llvm-svn: 183616
* [Sema] Make FunctionType's TSI use unadjusted argument typesReid Kleckner2013-06-084-39/+59
| | | | | | | | | | | | | | | | This helps preserve the type-as-written in the AST, which we need for MSVC mangling. In particular, we need to preserve the types of array parameters in function pointer types. The essence of this change is: - QualType ArgTy = Param->getType(); + QualType ArgTy = Param->getTypeSourceInfo()->getType(); ... followed by the adjustment in ActOnFunctionDeclarator(). Differential Revision: http://llvm-reviews.chandlerc.com/D883 llvm-svn: 183614
* Recognition of empty structures and unions is moved to semantic stageSerge Pavlov2013-06-082-6/+35
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D586 llvm-svn: 183609
* Added a type checking which handle the case of an ext vector and integral scalarJin-Gu Kang2013-06-081-6/+13
| | | | llvm-svn: 183602
* [analyzer] Minor fixups to r183062Anna Zaks2013-06-081-7/+8
| | | | | | Based on feedback from Jordan. llvm-svn: 183600
* [analyzer; alternate edges] Fix the edge locations in presence of macros.Anna Zaks2013-06-081-1/+1
| | | | | | | | | We drew the diagnostic edges to wrong statements in cases the note was on a macro. The fix is simple, but seems to work just fine for a whole bunch of test cases (plist-macros.cpp). Also, removes an unnecessary edge in edges-new.mm, when function signature starts with a macro. llvm-svn: 183599
* Fixed comment typo.Michael Gottesman2013-06-081-1/+1
| | | | llvm-svn: 183598
* Debug info: An if condition now creates a lexical scope of its own.Adrian Prantl2013-06-081-0/+10
| | | | | | | | | Two variables with the same name declared in two if conditions in the same scope are no longer coalesced into one. rdar://problem/14024005 llvm-svn: 183597
* Recursively lifetime-extend into array temporaries. These can get implicitlyRichard Smith2013-06-081-4/+3
| | | | | | created through binding a reference-to-array to an initializer list. llvm-svn: 183594
* When we're compiling with -pg make sure to link with gcrt1.o on linux. BeEric Christopher2013-06-071-1/+3
| | | | | | | | | | sure to do this always, this matches the behavior for the gcc driver. Fixes PR16251. Based on a patch by Qiao Yang. llvm-svn: 183591
* Fix va_arg on x86-64 for a struct containing a single int128_t. PR16248Eli Friedman2013-06-071-4/+17
| | | | llvm-svn: 183590
* Loosen r178109 even further, to assume that all redefined macros in system ↵Douglas Gregor2013-06-071-7/+10
| | | | | | | | headers and system modules are equivalent. Fixes <rdar://problem/14025673>. llvm-svn: 183588
* 80-column fixup after recent change to getOrCreateType.Eric Christopher2013-06-071-15/+20
| | | | llvm-svn: 183586
* Even in a modules world, people will depend on the weird xmmintrin.h -> ↵Douglas Gregor2013-06-072-2/+1
| | | | | | emmintrin.h forwarding. llvm-svn: 183585
* Fix line endings.Eli Friedman2013-06-071-2/+2
| | | | llvm-svn: 183583
* address some comments on r183474:Adrian Prantl2013-06-076-30/+33
| | | | | | | | | | - factor the name construction part out from constructSetterName - rename constructSetterName to the more appropriate constructSetterSelector no functionality change intended. rdar://problem/14035789 llvm-svn: 183582
* Revert "Properly consider the range of enum for range comparisons in C mode"David Majnemer2013-06-071-14/+11
| | | | | | The approach r183084 took was wrong, back it out. llvm-svn: 183575
* Add missing file from r183563 (the recommit of 183466).Eli Friedman2013-06-071-0/+136
| | | | llvm-svn: 183564
* Re-commit r183466 with a fix to make the TypeLoc casting machinery workEli Friedman2013-06-077-87/+65
| | | | | | | | | correctly in the presence of qualified types. (I had to change the unittest because it was trying to cast a QualifiedTypeLoc to TemplateSpecializationTypeLoc.) llvm-svn: 183563
* Objective-C: Another case of issuing warning about misusingFariborz Jahanian2013-06-071-13/+13
| | | | | | | property auto-synthesis before knowingit it is to be auto-synthesized. // rdar://14094682 llvm-svn: 183556
* PR16273: Weaken a bogus assertion.Richard Smith2013-06-071-1/+2
| | | | llvm-svn: 183550
* Objective-C: Removes a bogus warning about auto-synthesisFariborz Jahanian2013-06-071-10/+10
| | | | | | of properties. Fixes // rdar://14085456 llvm-svn: 183542
* Thread the 'Invalid' out parameter through SourceManager::getSLocEntry() and ↵Argyrios Kyrtzidis2013-06-071-1/+4
| | | | | | | | callees of SourceManager::getSLocEntryByID(). Also add an 'Invalid' check in SourceManager::computeMacroArgsCache(). llvm-svn: 183538
* Improved handling of escaped newlines at the token start.Alexander Kornienko2013-06-072-44/+21
| | | | | | | | | | | | | | Summary: Remove them from the TokenText as well. Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D935 llvm-svn: 183536
* Handle Unicode characters in fix-it replacement strings.Jordan Rose2013-06-071-19/+17
| | | | | | Patch by Sukolsak Sakshuwong! llvm-svn: 183535
* fix up recogtion of block pointer type in my last patch.Fariborz Jahanian2013-06-071-1/+3
| | | | | | | | | // rdar://14085217. e-This line, and those below, will be ignored-- M lib/Sema/SemaExpr.cpp llvm-svn: 183531
* Fixed calculation of penalty when breaking tokens.Alexander Kornienko2013-06-074-29/+48
| | | | | | | | | | | | | | | | | | | | | Summary: Introduced two new style parameters: PenaltyBreakComment and PenaltyBreakString. Add penalty for each character of a breakable token beyond the column limit (this relates mainly to comments, as they are broken only on whitespace). Tuned PenaltyBreakComment to prefer comment breaking over breaking inside most binary expressions. Fixed a bug that prevented *, & and && from being considered TT_BinaryOperator in the presense of adjacent comments. Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D933 llvm-svn: 183530
* Reverts r183466: "Perform dynamic alignment computations..."Manuel Klimek2013-06-077-197/+85
| | | | | | | | | This introduces bugs in TemplateSpecializationTypeLoc's angle bracket locations. Regression test follows in a subsequent commit. llvm-svn: 183513
* PR16243: Use CXXThisOverride during template instantiation, and fix up theRichard Smith2013-06-074-18/+20
| | | | | | | | places which weren't setting it up properly. This allows us to get the right cv-qualifiers for 'this' when it appears outside a method body in a class template. llvm-svn: 183483
* When we're synthesizing copy/move-assignment, we can't form a reference to anEli Friedman2013-06-071-1/+11
| | | | | | invalid field; make sure we don't try. Fixes <rdar://problem/14084171>. llvm-svn: 183479
* documentation: remove confusing reference to properties.Adrian Prantl2013-06-071-3/+3
| | | | llvm-svn: 183475
* ObjC Debug Info: Emit the names of accessors whenever they diverge fromAdrian Prantl2013-06-071-4/+34
| | | | | | | | the default names, not just when the isImplicit flag is set. rdar://problem/14035789 llvm-svn: 183474
* Improve documentation.Adrian Prantl2013-06-071-6/+12
| | | | llvm-svn: 183473
* blocks: fixes an ast bug when block pointer variableFariborz Jahanian2013-06-071-1/+4
| | | | | | | | | | is evaluated in a condition expression and then dereferenced to envoke the block. This is pr15663 and I applied a slight variation of the patch with a test case. (patch is from Arthur O'Dwyer). Also // rdar://14085217 llvm-svn: 183471
* Diagnose malformed x86 inline asm using 'y' constraint.Tim Northover2013-06-073-5/+27
| | | | | | | | X86's 'y' inline assembly constraint represents an MMX register, this change prevents Clang from hitting an assertion when passed an incompatible type to deal with. llvm-svn: 183467
* Perform dynamic alignment computations so that the data in TypeLocs isEli Friedman2013-06-077-85/+197
| | | | | | | | | | | | | | | correctly aligned. Not performing such computations led to misaligned loads, which crash on some platforms and are generally bad on other platforms. The implementation of TypeLocBuilder::pushImpl is rather messy; code using TypeLocBuilder accidentally assumes that partial TypeLocs are laid out like a complete TypeLoc. As a followup, I intend to work on fixing the TypeLocBuilder API to avoid exposing partial TypeLocs; this should substantially simplify the implemementation. Fixes PR16144. llvm-svn: 183466
* Implement DR7David Majnemer2013-06-061-5/+12
| | | | | | | | Disallowing deriving from classes that have private virtual base classes except in instances where the deriving class would be able to cast itself to the private virtual base via a different derivation. llvm-svn: 183462
* [analyzer] Address Jordan’s code review for r183451Anna Zaks2013-06-061-3/+3
| | | | llvm-svn: 183455
* [analyzer] Ensure that pieces with invalid locations always get removed from ↵Anna Zaks2013-06-061-9/+24
| | | | | | | | | | | the BugReport The function in which we were doing it used to be conditionalized. Add a new unconditional cleanup step. This fixes PR16227 (radar://14073870) - a crash when generating html output for one of the test files. llvm-svn: 183451
* [analyzer] fixup the commentAnna Zaks2013-06-061-1/+1
| | | | llvm-svn: 183450
* [analyzer; new edges] Simplify edges in a C++11 for-range loop.Jordan Rose2013-06-064-16/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously our edges were completely broken here; now, the final result is a very simple set of edges in most cases: one up to the "for" keyword for context, and one into the body of the loop. This matches the behavior for ObjC for-in loops. In the AST, however, CXXForRangeStmts are handled very differently from ObjCForCollectionStmts. Since they are specified in terms of equivalent statements in the C++ standard, we actually have implicit AST nodes for all of the semantic statements. This makes evaluation very easy, but diagnostic locations a bit trickier. Fortunately, the problem can be generally defined away by marking all of the implicit statements as part of the top-level for-range statement. One of the implicit statements in a for-range statement is the declaration of implicit iterators __begin and __end. The CFG synthesizes two separate DeclStmts to match each of these decls, but until now these synthetic DeclStmts weren't in the function's ParentMap. Now, the CFG keeps track of its synthetic statements, and the AnalysisDeclContext will make sure to add them to the ParentMap. <rdar://problem/14038483> llvm-svn: 183449
* Fix incorrect line breaking before trailing block comments.Daniel Jasper2013-06-061-1/+1
| | | | | | | | | | | | | | | | | Before, clang-format would happily move a trailing block comment to a new line, which normally changes the perceived binding of that comment. E.g., it would move: void f() { /* comment */ ... } to: void f() { /* comment */ ... } llvm-svn: 183420
* Fix a crash with -Wassign-enum, where we didn't adjust the APInt type of theJoey Gouly2013-06-061-10/+11
| | | | | | | | | | constant. Also fix some spelling mistakes and formatting issues. Reviewed by Richard Smith over IRC. Fixes PR15069. llvm-svn: 183409
* ClangTool: strip -o from the command linePavel Labath2013-06-062-2/+20
| | | | | | | | | | | | | | Summary: This patch creates a new ArgumentsAdjuster, which removes all -o parameters from the command line. This adjuster is inserted by default into the ClangTool pipeline. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D925 llvm-svn: 183398
* Implement DR1270: braces can be elided in all aggregate initialization, notRichard Smith2013-06-061-22/+8
| | | | | | | just copy-list-initialization in a variable declaration. This effectively reverts r142147. llvm-svn: 183397
* Disallow reinterpret_cast from pointer to bool on WindowsHans Wennborg2013-06-061-2/+4
| | | | | | | | | | | | This became allowed by accident in r131201, but triggers an assert. That patch added an exception to allow conversion from pointers to narrow integral types for MSVC compatibility. However, a pointer can already be converted to bool in a civilized manner; allowing conversion via reinterpret_cast is a bad idea. Fixes PR16222. llvm-svn: 183394
* Fix clang-format's expression parser for leading }s.Daniel Jasper2013-06-061-1/+5
| | | | | | | | The leading "}" in the construct "} else if (..) {" was confusing the expression parser. Thus, no fake parentheses were generated and the indentation was broken in some cases. llvm-svn: 183393
* Improve c-style cast detection.Daniel Jasper2013-06-061-1/+4
| | | | | | | | | | | | | | Before: return (my_int) aaaa; template <> void f<int>(int i)SOME_ANNOTATION; f("aaaa" SOME_MACRO(aaaa)"aaaa"); After: return (my_int)aaaa; template <> void f<int>(int i) SOME_ANNOTATION; f("aaaa" SOME_MACRO(aaaa) "aaaa"); llvm-svn: 183389
* When a static storage duration temporary appears in a constant expression, itRichard Smith2013-06-061-2/+7
| | | | | | | | must be initialized by a constant expression (not just a core constant expression), because we're going to emit it as a global. Core issue for this is pending. llvm-svn: 183388
OpenPOWER on IntegriCloud