summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Fix test case broken by previous commit.Jordan Rose2012-11-151-0/+1758
| | | | llvm-svn: 168020
* [analyzer] Make sure calls in synthesized functions have valid path locations.Jordan Rose2012-11-155-1849/+420
| | | | | | | | | | | | | | | | | | We do this by using the "most recent" good location: if a synthesized function 'A' calls another function 'B', the path notes for the call to 'B' will be placed at the same location as the path note for calling 'A'. Similarly, the call to 'A' will have a note saying "Entered call from...", and now we just don't emit that (since the user doesn't have a body to look at anyway). Previously, we were doing this for the "Calling..." notes, but not for the "Entered call from..." or "Returning to caller". This caused a crash when the path entered and then exiting a call within a synthesized body. <rdar://problem/12657843> llvm-svn: 168019
* [PCH] Reading expressions from attributes should be done using ReadExpr(),Argyrios Kyrtzidis2012-11-152-1/+318
| | | | | | | | | | | not ReadExpr(). Also add a test case making sure the thread safety attributes work as expected when they come from a PCH. Fixes rdar://12584141 & http://llvm.org/PR13982 llvm-svn: 168017
* Fix a trivial bool-related bug I spotted while skimming David Fang'sEli Friedman2012-11-152-2/+6
| | | | | | current list of powerpc-darwin8 failures. llvm-svn: 168016
* Add link to cfe-users mailing list.Tanya Lattner2012-11-151-0/+1
| | | | llvm-svn: 168015
* Per [basic.lookup.classref]p3, in an expression of the form p->~type-name, theRichard Smith2012-11-153-2/+12
| | | | | | | | | | type-name is looked up in the context of the complete postfix-expression. Don't forget to pass the scope into this lookup when the type-name is a template-id; it might name an alias template which can't be found within the class itself. Bug spotted by Johannes Schaub on #llvm. llvm-svn: 168011
* Fix DiagnoseBitwisePrecedence so it doesn't cast "-1" to the typeEli Friedman2012-11-151-24/+16
| | | | | | | | | BinaryOperator::Opcode. This is bad form, and the behavior of the static_cast in this case is unspecified according to the standard. Fixes a warning that showed up from r167992 on self-host. llvm-svn: 168010
* objective-C blocks: make cc1 flag -encode-extended-block-signatureFariborz Jahanian2012-11-152-3/+3
| | | | | | the default. // rdar://12109031 llvm-svn: 168007
* Make template diffing handle integral expressions of various widths correctly.Eli Friedman2012-11-143-4/+31
| | | | | | PR14342. llvm-svn: 168005
* Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode forRichard Smith2012-11-147-7/+50
| | | | | | | | | working with preprocessed testcases. This causes source locations in diagnostics to point at the spelling location instead of the presumed location, while still keeping the semantic effects of the line directives (entering and leaving system-header mode, primarily). llvm-svn: 168004
* [utils/ClangDataFormat.py] Add data formatter for StringRef.Argyrios Kyrtzidis2012-11-141-0/+21
| | | | llvm-svn: 168003
* [utils/ClangDataFormat.py] In the summary of SourceLocation, include whether ↵Argyrios Kyrtzidis2012-11-141-2/+5
| | | | | | | | it is local or loaded. llvm-svn: 168002
* objective-C blocks: under cc1 flag -encode-extended-block-signature,Fariborz Jahanian2012-11-145-2/+32
| | | | | | | | generate expanded signature encoding to include types as we already do this for protocol method lists. // rdar://12109031 llvm-svn: 167997
* [analyzer] Fix test in previous commit.Jordan Rose2012-11-141-1/+3
| | | | llvm-svn: 167995
* [analyzer] Add a test case for printing a path note at a PreStmt point.Jordan Rose2012-11-141-1/+28
| | | | | | | | This is also a false-positive test case for <rdar://problem/12415065>. <rdar://problem/12687586> llvm-svn: 167994
* Improve -Wtautological-constant-out-of-range-compare by taking into accountRichard Trieu2012-11-143-19/+191
| | | | | | | | | type conversion between integers. This allows the warning to be more accurate. Also, turned the warning off in an analyzer test. The relavent test cases are covered by the tests in Sema. llvm-svn: 167992
* Teach the AST importer to merge enumerator constants. FixesDouglas Gregor2012-11-141-2/+20
| | | | | | <rdar://problem/12676166>, and tested on the LLDB side of the world. llvm-svn: 167990
* When evaluating variably modified types for function parameters, dig out theEli Friedman2012-11-142-2/+15
| | | | | | | | | | type as written from the ParmVarDecl; it's unclear whether the standard (C99 6.9.1p10) requires this, but we're following the precedent set by gcc, and hopefully nobody will ever ask about this again. PR9559 / <rdar://problem/12621983>. llvm-svn: 167985
* Remove the cellspu port.Eric Christopher2012-11-145-16/+5
| | | | | | Approved by Chris Lattner. llvm-svn: 167983
* ParseTemplate.cpp: Prune obsolete descriptions in ↵NAKAMURA Takumi2012-11-141-10/+0
| | | | | | | | | | | | | | | | ParseSingleDeclarationAfterTemplate(), for now. [-Wdocumentation] /// \param TemplateParams if non-NULL, the template parameter lists /// that preceded this declaration. In this case, the declaration is a /// template declaration, out-of-line definition of a template, or an /// explicit template specialization. When NULL, the declaration is an /// explicit template instantiation. /// /// \param TemplateLoc when TemplateParams is NULL, the location of /// the 'template' keyword that indicates that we have an explicit /// template instantiation. llvm-svn: 167982
* [analyzer] Ensure that CmpRuns recursively walks the output directory.Anna Zaks2012-11-141-39/+40
| | | | llvm-svn: 167981
* In ExpressionEvaluationContextRecord manage LambdaMangle with a sharedArgyrios Kyrtzidis2012-11-143-6/+46
| | | | | | | | | pointer, otherwise we will double free it when ExpressionEvaluationContextRecord gets copied. Fixes crash in rdar://12645424 & http://llvm.org/PR14252 llvm-svn: 167946
* The ObjC++-to-C++ personality trick is only necessary on NeXT runtimes,John McCall2012-11-141-4/+5
| | | | | | | which is not coincidentally the only place it works, either (because of how it tests for EH_TYPE symbols). llvm-svn: 167935
* fixes a buildbot failure.Fariborz Jahanian2012-11-141-0/+1
| | | | llvm-svn: 167934
* Fix 80-column violation.Fariborz Jahanian2012-11-141-3/+5
| | | | llvm-svn: 167932
* objective-C blocks: Provide layout map for byrefFariborz Jahanian2012-11-1412-101/+301
| | | | | | variables captured in a block. // rdar://12184410 llvm-svn: 167931
* s/tranform/transform/Benjamin Kramer2012-11-1417-19/+19
| | | | llvm-svn: 167929
* Move some GNUStep-specific code out of CGObjCGNU.John McCall2012-11-141-22/+25
| | | | | | Patch by Jonathan Schleifer. llvm-svn: 167925
* PR14279: Work around this major miscompilation by treating move operations asRichard Smith2012-11-142-5/+46
| | | | | | | | non-trivial if they would not call a move operation, even if they would in fact call a trivial copy operation. A proper fix is to follow, but this small directed fix is intended for porting to the 3.2 release branch. llvm-svn: 167920
* When we have a MemberExpr referring to an overloaded static member function,Richard Smith2012-11-142-0/+9
| | | | | | | | | and we resolve it to a specific function based on the type which it's used as, don't forget to mark it as referenced. Fixes a regression introduced in r167514. llvm-svn: 167918
* Code cleanup: Remove trailing whitespace in unwind.h.Logan Chien2012-11-141-20/+20
| | | | llvm-svn: 167915
* Remove debugging assert.David Blaikie2012-11-141-3/+0
| | | | | | Found by Richard Smith in post-commit review of r167906. llvm-svn: 167911
* SemaTemplateDeduction.cpp: Prune two obsolete descriptions. [-Wdocumentation]NAKAMURA Takumi2012-11-141-9/+0
| | | | | | | | | | | | | | | | | * getMostSpecialized() /// \param Index if non-NULL and the result of this function is non-nULL, /// receives the index corresponding to the resulting function template /// specialization. * DeduceTemplateArguments() /// \param Name the name of the function being called. This is only significant /// when the function template is a conversion function template, in which /// case this routine will also perform template argument deduction based on /// the function to which llvm-svn: 167909
* ParseTemplate.cpp: Doxygen fix in AnnotateTemplateIdToken(). [-Wdocumentation]NAKAMURA Takumi2012-11-141-1/+1
| | | | llvm-svn: 167908
* Suppress elided variadic macro argument extension diagnostic for macros usingEli Friedman2012-11-147-4/+55
| | | | | | | | | | | | | | | | | | | | | | the related comma pasting extension. In certain cases, we used to get two diagnostics for what is essentially one extension. This change suppresses the first diagnostic in certain cases where we know we're going to print the second diagnostic. The diagnostic is redundant, and it can't be suppressed in the definition of the macro because it points at the use of the macro, so we want to avoid printing it if possible. The implementation works by detecting constructs which look like comma pasting at the time of the definition of the macro; this information is then used when the macro is used. (We can't actually detect whether we're using the comma pasting extension until the macro is actually used, but we can detecting constructs which will be comma pasting if the varargs argument is elided.) <rdar://problem/12292192> llvm-svn: 167907
* Provide the correct mangling and linkage for certain unnamed nested classes.David Blaikie2012-11-149-18/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects the mangling and linkage of classes (& their member functions) in cases like this: struct foo { struct { void func() { ... } } x; }; we were accidentally giving this nested unnamed struct 'no' linkage where it should've had the linkage of the outer class. The mangling was incorrecty too, mangling as TU-wide unnamed type mangling of $_X rather than class-scoped mangling of UtX_. This also fixes -Wunused-member-function which would incorrectly diagnose 'func' as unused due to it having no linkage & thus appearing to be TU-local when in fact it might be correctly used in another TU. Similar mangling should be applied to function local classes in similar cases but I've deferred that for a subsequent patch. Review/discussion by Richard Smith, John McCall, & especially Eli Friedman. llvm-svn: 167906
* Use consistent spelling of 'behavior' in a C++ warning.Anders Carlsson2012-11-141-1/+1
| | | | llvm-svn: 167902
* This function isn't called SaveFiles any more.Nick Lewycky2012-11-141-1/+1
| | | | llvm-svn: 167901
* Fix an assertion failure printing the unused-label fixit in files using CRLF ↵Eli Friedman2012-11-142-1/+19
| | | | | | line endings. <rdar://problem/12639047>. llvm-svn: 167900
* Remove another questionable use of hasTrivial*. The relevant thing for thisRichard Smith2012-11-144-120/+139
| | | | | | | test was whether the /selected/ operator= was trivial, not whether the class had any trivial (or any non-trivial) operator=s. llvm-svn: 167897
* Accept and pass arguments to __unknown_anytype in argumentJohn McCall2012-11-146-0/+91
| | | | | | | | | | | | | | | | | | | | | positions of Objective-C methods. It is possible to recover a lot of type information about Objective-C methods from the reflective metadata for their implementations. This information is not rich when it comes to struct types, however, and it is not possible to produce a type in the debugger's round-tripped AST which will really do anything useful during type-checking. Therefore we allow __unknown_anytype in these positions, which essentially disables type-checking for that argument. We infer the parameter type to be the unqualified type of the argument expression unless that expression is an explicit cast, in which case it becomes the type-as-written of that cast. rdar://problem/12565338 llvm-svn: 167896
* Fix typoMatt Beaumont-Gay2012-11-141-1/+1
| | | | llvm-svn: 167891
* Revert "Use the 'count' attribute instead of the 'upper_bound' attribute."Eric Christopher2012-11-133-46/+10
| | | | | | | | temporarily since it breaks the gdb bots. This reverts commit r167807/30305bec25cac981c6d4a3b8be004401310a82a7. llvm-svn: 167887
* Don't try to save the assigned value in a Objective-C property assignmentEli Friedman2012-11-133-13/+54
| | | | | | | | | if the type of the value is a non-trivial class type. Fixes PR14318. (There's a minor ObjC++ language change here: given that we can't save the value, the type of the assignment expression is void in such cases.) llvm-svn: 167884
* [ms] Make mangleIntegerLiteral less aware of exact type of the literal.Nico Weber2012-11-131-7/+8
| | | | | | | | | | | | | Integer literal mangling does not actually depend on exact type of the literal. This will simplify calling mangleIntegerLiteral when literal type is not known, for example, when sizes or offsets are mangled as integer literals. Also, call mangleNumber instead of directly printing mangled values of 0/1, to avoid this knowledge from being in multiple places. Patch from Evgeny Eltsin! llvm-svn: 167878
* For classes that have the warn_unused_result attribute, don't apply theKaelyn Uhrain2012-11-132-1/+11
| | | | | | | attribute to the class' methods even when they return an instance of the class (e.g. assignment operators). llvm-svn: 167873
* [analyzer] Address Jordan's code review for r167813.Anna Zaks2012-11-132-20/+21
| | | | | | | This simplifies logic, fixes a bug, and adds a test case. Thanks Jordan! llvm-svn: 167868
* Revert r167801, "[preprocessor] When #including something that contributes noDaniel Dunbar2012-11-137-246/+2
| | | | | | tokens at all,". This change broke External/Nurbs in LLVM test-suite. llvm-svn: 167858
* Simplify function try/catch scope handling.David Blaikie2012-11-132-13/+4
| | | | | | Based on post-commit review feedback for r167766 by Richard Smith. llvm-svn: 167856
* Fix AST-matcher descendant visiting for Types, TypeLocs and ↵Daniel Jasper2012-11-131-1/+7
| | | | | | | | NestedNamespecifierLocs. The RecursiveASTVisitor assumes that any given Traverse-method can be called with a NULL-node. So the subclass needs to handle these appropriately. llvm-svn: 167850
OpenPOWER on IntegriCloud