summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Skip transparent contexts when looking for using directives in name lookup.Douglas Gregor2013-04-092-5/+13
| | | | | | Fixes the bootstrap regression I introduced in r179067. llvm-svn: 179079
* Mark as referenced the functions from instantiated UserDefinedLiterals.Argyrios Kyrtzidis2013-04-092-0/+15
| | | | | | Fixes rdar://13589856 llvm-svn: 179078
* [analyzer] Keep tracking the pointer after the escape to more aggressively ↵Anna Zaks2013-04-094-165/+212
| | | | | | | | | | | report mismatched deallocator Test that the path notes do not change. I don’t think we should print a note on escape. Also, I’ve removed a check that assumed that the family stored in the RefStete could be AF_None and added an assert in the constructor. llvm-svn: 179075
* Add test case calling a deprecated method from a subclass that reimplements ↵Ted Kremenek2013-04-081-0/+28
| | | | | | | | that method gets a warning. Test case from <rdar://problem/11627873>. llvm-svn: 179070
* Don't copy just to capture a strong block pointer under ARC.John McCall2013-04-082-7/+66
| | | | | | | | | It turns out that the optimizer can't eliminate this without extra information, for which there's a separate bug. rdar://13588325 llvm-svn: 179069
* <rdar://problem/13584715> Converted constant expressions are expected to ↵Douglas Gregor2013-04-082-1/+17
| | | | | | | | | | | | | | have integral values. We were assuming that any expression used as a converted constant expression would either not have a folded constant value or would be an integer, which is not the case for some ill-formed constant expressions. Because converted constant expressions are only used where integral values are expected, we can simply treat this as an error path. If that ever changes, we'll need to widen the interface of Sema::CheckConvertedConstantExpression() anyway. llvm-svn: 179068
* <rdar://problem/13540899> Collect using directives from all of the semantic ↵Douglas Gregor2013-04-082-8/+44
| | | | | | | | | | | | contexts not represented by scopes. This fixes a regression I introduced in r178136, where we would not consider the using directives from the semantic declaration contexts that aren't represented by the lexical scopes (Scope) when performing unqualified name lookup. This lead to horribly funny diagnostics like "no identifier named 'foo'; did you mean 'foo'?". llvm-svn: 179067
* clang/test/Index/annotate-tokens.cpp: Appease msvc-targets with ↵NAKAMURA Takumi2013-04-081-1/+1
| | | | | | -fno-delayed-template-parsing. llvm-svn: 179065
* Recognize function-like macro usages without semicolon in declaration context.Alexander Kornienko2013-04-082-9/+32
| | | | | | | | | | | | | | | | | | | | Summary: Preserve line breaks after function-like macro usages without semicolon, e.g.: QQQ(xxx) class X { }; Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D638 llvm-svn: 179064
* Fix typo in assertion.Nick Lewycky2013-04-081-1/+1
| | | | llvm-svn: 179061
* The PNaCl target no longer permits __attribute__((regparm)).Eli Bendersky2013-04-083-73/+18
| | | | | | | Remove the custom lowering code dealing with it, disallow it in PNaclTargetInfo and adjust tests accordingly. llvm-svn: 179059
* <rdar://problem/13559825> Further reduce template instantiation depth down ↵Douglas Gregor2013-04-082-2/+2
| | | | | | to 256, since we're blowing the stack for a trivial "factorial" class template. llvm-svn: 179057
* Fix PR15634, better error message for template deduction failure.Richard Trieu2013-04-083-4/+48
| | | | | | | | | | | | | When two template decls with the same name are used in this diagnostic, force them to print their qualified names. This changes the bad message of: candidate template ignored: could not match 'array' against 'array' to the better message of: candidate template ignored: could not match 'NS2::array' against 'NS1::array' llvm-svn: 179056
* Update checker build to checker-273Ted Kremenek2013-04-082-1/+15
| | | | llvm-svn: 179055
* <rdar://problem/13540921> Fix a crasher when an Objective-C for-in loop gets ↵Douglas Gregor2013-04-084-16/+50
| | | | | | a non-variable iteration declaration. llvm-svn: 179053
* fix indentationAdrian Prantl2013-04-081-1/+1
| | | | llvm-svn: 179052
* The recent GCOV changes expect the initial version string to be in forward ↵Bill Wendling2013-04-081-1/+1
| | | | | | order. llvm-svn: 179050
* Revamp indentation behavior for complex binary expressions.Daniel Jasper2013-04-084-50/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to indent according to operator precedence and pretty much identical to how stuff would be indented with parenthesis. Before: bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ccccccccccccccccccccccccccccccccccccccccc; After: bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ccccccccccccccccccccccccccccccccccccccccc; llvm-svn: 179049
* Thread safety analysis: turn on checking within lock and unlock functions.DeLesley Hutchins2013-04-083-22/+134
| | | | | | These checks are enabled with the -Wthread-safety-beta flag. llvm-svn: 179046
* fixes a typo in my last patch.Fariborz Jahanian2013-04-081-1/+1
| | | | | | // rdar://12379114 llvm-svn: 179042
* In the comparison, both clang and GCC are popular and widely adopted. This ↵Chris Lattner2013-04-081-1/+0
| | | | | | | | is no longer a win of GCC. This whole doc should really be looked at. llvm-svn: 179040
* doce parsing: adding few more headerdoc tags.Fariborz Jahanian2013-04-082-0/+16
| | | | | | // rdar://12379114 llvm-svn: 179039
* <rdar://problem/13540921> Cope with instantiations of the C++11 range-based ↵Douglas Gregor2013-04-082-0/+22
| | | | | | for loop that end up being Objective-C fast enumeration loops. llvm-svn: 179037
* <rdar://problem/13540921> Cope with deduced 'auto' in a C++11 for-range loop ↵Douglas Gregor2013-04-082-0/+29
| | | | | | that is actually an Objective-C fast enumeration loop. llvm-svn: 179035
* Tweak warning text for nil value in ObjC container warning.Ted Kremenek2013-04-082-3/+3
| | | | llvm-svn: 179034
* Test case for r179030.Chad Rosier2013-04-081-0/+7
| | | | llvm-svn: 179031
* <rdar://problem/12806802> Propagate access specifiers for conversion ↵Douglas Gregor2013-04-083-14/+25
| | | | | | | | | | | | | functions to the conversion function set eagerly. This slightly propagates an existing hack that delays when we provide access specifiers for the visible conversion functions of a class by copying the available access specifier early. The only client this affects is LLDB, which tends to discover and add conversion functions after the class is technically "complete". As such, the only observable difference is in LLDB, so the testing will go there. llvm-svn: 179029
* Add matcher for NamespaceDecls.Daniel Jasper2013-04-082-3/+23
| | | | llvm-svn: 179027
* Remove outdated part of help message.Daniel Jasper2013-04-081-1/+0
| | | | | | | The styles are now documented with the -style option. This fixes llvm.org/PR15689. llvm-svn: 179017
* Revert accidental commit r179015.Daniel Jasper2013-04-084-54/+38
| | | | llvm-svn: 179016
* xDaniel Jasper2013-04-084-38/+54
| | | | llvm-svn: 179015
* Sema: Don't crash when trying to emit a warning for a duplicate value in an ↵Benjamin Kramer2013-04-072-1/+10
| | | | | | | | | invalid enum. Fixes PR15693. A null check on a pointer returned from cast<> is a very dubious construct, do we have a checker for this somewhere? llvm-svn: 178975
* Remove nondeterminism introduced in r178950.Richard Smith2013-04-062-11/+14
| | | | llvm-svn: 178952
* When an internal-linkage function or variable is declared within an extern "C"Richard Smith2013-04-063-0/+96
| | | | | | | | | | linkage specification, and is marked as __attribute__((used)), try to also give it the unmangled name (by emitting an internal linkage alias) if nothing else within the translation unit would use that name. This allows inline asm in that translation unit to use the entity via its unmangled name, which people apparently rely on. llvm-svn: 178950
* [analyzer] When creating a trimmed graph, preserve whether a node is a sink.Jordan Rose2013-04-062-1/+14
| | | | | | | | | | | | | | This is important because sometimes two nodes are identical, except the second one is a sink. This bug has probably been around for a while, but it wouldn't have been an issue in the old report graph algorithm. I'm ashamed to say I actually looked at this the first time around and thought it would never be a problem...and then didn't include an assertion to back that up. PR15684 llvm-svn: 178944
* [objcmt] Fix a mishandled conversion to objc directory literal.Argyrios Kyrtzidis2013-04-063-0/+4
| | | | | | rdar://13181413 llvm-svn: 178942
* <rdar://problem/13325066> Destroy std::initializer_list temporaries whose ↵Douglas Gregor2013-04-062-4/+39
| | | | | | lifetime has been extended by reference binding. llvm-svn: 178939
* [analyzer] Shorten the malloc checker’s leak messageAnna Zaks2013-04-0613-102/+103
| | | | | | As per Ted’s suggestion! llvm-svn: 178938
* Rework how ObjC method inherit deprecated/availability.Ted Kremenek2013-04-065-21/+45
| | | | | | | | | | | | | | | | | | | | | New rule: - Method decls in @implementation are considered "redeclarations" and inherit deprecated/availability from the @interface. - All other cases are consider overrides, which do not inherit deprecated/availability. For example: (a) @interface redeclares a method in an adopted protocol. (b) A subclass redeclares a method in a superclass. (c) A protocol redeclares a method from another protocol it adopts. The idea is that API authors should have the ability to easily move availability/deprecated up and down a class/protocol hierarchy. A redeclaration means that the availability/deprecation is a blank slate. Fixes <rdar://problem/13574571> llvm-svn: 178937
* [analyzer] Reword error messages for nil keys and values of NSMutableDictionary.Anna Zaks2013-04-052-14/+25
| | | | llvm-svn: 178935
* [analyzer] Remove another redundancy from trackNullOrUndefAnna Zaks2013-04-051-6/+0
| | | | llvm-svn: 178934
* [analyzer] Fix null tracking for the given test case, by using the proper ↵Anna Zaks2013-04-052-18/+21
| | | | | | state and removing redundant code. llvm-svn: 178933
* When -Woverloaded-virtual is triggered, call HandleFunctionTypeMismatch to addRichard Trieu2013-04-053-2/+31
| | | | | | | more information to the notes. This information is already present on other diagnostic messages that involves overloads. llvm-svn: 178923
* [libclang] Fix cursor visitation to not ignore template arguments in ↵Argyrios Kyrtzidis2013-04-053-1/+80
| | | | | | | | out-of-line member functions. rdar://13535645 llvm-svn: 178911
* Add an error to check that all program scope variables are in the constant ↵Tanya Lattner2013-04-055-6/+20
| | | | | | address space in OpenCL. llvm-svn: 178906
* doce parsing: adding few more headerdoc tags.Fariborz Jahanian2013-04-053-0/+42
| | | | | | // rdar://12379114 llvm-svn: 178903
* [analyzer] Eliminates all the cases with unknown family.Anton Yartsev2013-04-051-6/+7
| | | | | | Now treat AF_None family as impossible in isTrackedFamily() llvm-svn: 178899
* Try to appease the atom buildbotsManman Ren2013-04-051-1/+4
| | | | llvm-svn: 178898
* [analyzer] Re-enable cplusplus.NewDelete (but not NewDeleteLeaks).Jordan Rose2013-04-0511-21/+26
| | | | | | | | As mentioned in the previous commit message, the use-after-free and double-free warnings for 'delete' are worth enabling even while the leak warnings still have false positives. llvm-svn: 178891
* [analyzer] Split new/delete checker into use-after-free and leaks parts.Jordan Rose2013-04-059-26/+99
| | | | | | | | | | | | This splits the leak-checking part of alpha.cplusplus.NewDelete into a separate user-level checker, alpha.cplusplus.NewDeleteLeaks. All the difficult false positives we've seen with the new/delete checker have been spurious leak warnings; the use-after-free warnings and mismatched deallocator warnings, while rare, have always been valid. <rdar://problem/6194569> llvm-svn: 178890
OpenPOWER on IntegriCloud