summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-11142-1465/+1465
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* llvm::SwitchInstStepan Dyatkovskiy2012-03-111-1/+1
| | | | | | | Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default. Added some notes relative to case iterators. llvm-svn: 152533
* Document the availability attributeDouglas Gregor2012-03-111-1/+1
| | | | llvm-svn: 152531
* When template argument deduction is ignoring qualifiers, perform deepDouglas Gregor2012-03-111-15/+28
| | | | | | | | structural comparison of non-dependent types. Otherwise, we end up rejecting cases where the non-dependent types don't match due to qualifiers in, e.g., a pointee type. Fixes PR12132. llvm-svn: 152529
* Add a missing 'template' keyword.Douglas Gregor2012-03-111-1/+1
| | | | llvm-svn: 152526
* [analyzer] Replace a static helper with existing logic. No functionality change.Jordy Rose2012-03-111-26/+18
| | | | llvm-svn: 152521
* When determining whether an identifier followed by a '<' in a memberDouglas Gregor2012-03-101-9/+21
| | | | | | | | access expression is the start of a template-id, ignore function templates found in the context of the entire postfix-expression. Fixes PR11856. llvm-svn: 152520
* Fix crash & accepts-invalid for array of arrays of user defined type.David Blaikie2012-03-101-8/+11
| | | | | | | Test case/other help by Richard Smith. Code review by John McCall. llvm-svn: 152519
* No longer defining GNUC mode when compiling for Microsoft compatibility. ↵Aaron Ballman2012-03-101-5/+8
| | | | | | This allows people's cross-platform compiler-specific macros to work properly. llvm-svn: 152512
* PR12225: The requirement that literal operators be namespace-scope functionsRichard Smith2012-03-101-4/+1
| | | | | | does not imply that such functions can't be declared at block scope. llvm-svn: 152509
* Use VersionTuple to manage macosx versions in the driver. No functionality ↵Benjamin Kramer2012-03-103-34/+13
| | | | | | change. llvm-svn: 152504
* Simplify code. No functionality change.Benjamin Kramer2012-03-101-14/+5
| | | | llvm-svn: 152503
* objective-c modern rewriter: add __declspec(dllexport) to forwardFariborz Jahanian2012-03-101-2/+9
| | | | | | declaration of class metadata when they are defined later. llvm-svn: 152500
* objc modern rewriter: Define __OBJC2__ in written file.Fariborz Jahanian2012-03-101-0/+4
| | | | | | // rdar://11024543 llvm-svn: 152496
* Replace a map of boolean values with a set.Benjamin Kramer2012-03-101-14/+8
| | | | | | No functionality change. llvm-svn: 152494
* The type of a definition should not increase its visibility. Fixes PR12221.Rafael Espindola2012-03-101-2/+2
| | | | llvm-svn: 152493
* Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr toJohn McCall2012-03-1041-513/+263
| | | | | | | | track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit. llvm-svn: 152491
* Slightly tweak this condition. "isTransparentContext()" was checking whether anNick Lewycky2012-03-101-2/+1
| | | | | | | | enum is scoped or not, which is not relevant here. Instead, phrase the loop in the same terms that the standard uses, instead of this awkward set of conditions that is *nearly* equal. llvm-svn: 152489
* Could not find this in C99. Perhaps this rule comes from a DR, but in any caseNick Lewycky2012-03-101-0/+1
| | | | | | | please annotate it with a note explaining why this wrong-seeming behaviour is correct. llvm-svn: 152488
* Only make a call to a copy constructor elidable if in fact we areDouglas Gregor2012-03-101-1/+20
| | | | | | doing a copy. Fixes PR12139. llvm-svn: 152485
* [Sema] A tag decl that is marked as invalid and is used in a decl-spec,Argyrios Kyrtzidis2012-03-101-3/+0
| | | | | | | | should not impede creating a proper TypeLoc info for the decl-spec. This improves our semantic error recovery. llvm-svn: 152481
* Unify the BlockDeclRefExpr and DeclRefExpr paths so thatJohn McCall2012-03-105-52/+201
| | | | | | | | we correctly emit loads of BlockDeclRefExprs even when they don't qualify as ODR-uses. I think I'm adequately convinced that BlockDeclRefExpr can die. llvm-svn: 152479
* Fix the dumping of BlockExprs.John McCall2012-03-101-1/+4
| | | | llvm-svn: 152478
* Fix a use of the C99 PRI format macros not to conflict with C++11 UDLs.Benjamin Kramer2012-03-101-1/+2
| | | | llvm-svn: 152475
* Make sure the accessors for overridden methods don't return inherited ↵Eli Friedman2012-03-101-4/+9
| | | | | | constructors. Fixes PR12219. llvm-svn: 152470
* objc modern rewriter: don't export @package ivar symbols.Fariborz Jahanian2012-03-101-1/+2
| | | | llvm-svn: 152469
* [analyzer] fix regression in analyzer of NOT actually aborting on Stmts it ↵Ted Kremenek2012-03-105-14/+82
| | | | | | | | | | | doesn't understand. We registered as aborted, but didn't treat such cases as sinks in the ExplodedGraph. Along the way, add basic support for CXXCatchStmt, expanding the set of code we actually analyze (hopefully correctly). Fixes: <rdar://problem/10892489> llvm-svn: 152468
* IRgen/ABI/x86_64: Avoid passing small structs using byval sometimes.Daniel Dunbar2012-03-101-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We do this when it is easy to determine that the backend will pass them on the stack properly by itself. Currently LLVM codegen is really bad in some cases with byval, for example, on the test case here (which is derived from Sema code, which likes to pass SourceLocations around):: struct s47 { unsigned a; }; void f47(int,int,int,int,int,int,struct s47); void test47(int a, struct s47 b) { f47(a, a, a, a, a, a, b); } we used to emit code like this:: ... movl %esi, -8(%rbp) movl -8(%rbp), %ecx movl %ecx, (%rsp) ... to handle moving the struct onto the stack, which is just appalling. Now we generate:: movl %esi, (%rsp) which seems better, no? llvm-svn: 152462
* Minor change to my last rewrite patch.Fariborz Jahanian2012-03-101-1/+6
| | | | llvm-svn: 152461
* objc modern rewriter: Mark class and ivar definitions with __declspec(dllexport)Fariborz Jahanian2012-03-101-2/+2
| | | | | | // rdar://11023563 llvm-svn: 152459
* Qualifiers on a canonical array type go on the outermost type, not theDouglas Gregor2012-03-101-6/+0
| | | | | | innermost type. Fixes PR12142. llvm-svn: 152456
* Assign APValues by swapping from a temporary. Removes a bunch of unnecessaryRichard Smith2012-03-102-44/+55
| | | | | | | | copy-construction, which Daniel Dunbar reports as giving a 0.75% speedup on 403.gcc/combine.c. The performance differences on my constexpr torture tests are below the noise floor. llvm-svn: 152455
* objective-c modern rewriter. More fixes related to rewritingFariborz Jahanian2012-03-091-18/+44
| | | | | | ivars in the modern rewriter. llvm-svn: 152451
* Teach RetainCountChecker about mixing method families with explicit ↵Ted Kremenek2012-03-091-0/+30
| | | | | | annotations. Fixes <rdar://problem/10824732>. llvm-svn: 152448
* Improve diagnostics for UCNs referring to control characters and members of theRichard Smith2012-03-091-24/+41
| | | | | | | | | | basic source character set in C++98. Add -Wc++98-compat diagnostics for same in literals in C++11. Extend such support to cover string literals as well as character literals, and mark N2170 as done. This seems too minor to warrant a release note to me. Let me know if you disagree. llvm-svn: 152444
* [Sema] Fix a diag change to include a range that appeared intended, but neverDaniel Dunbar2012-03-091-1/+2
| | | | | | actually happened. llvm-svn: 152442
* Update comment after r152140. Clarify a bit too.Nico Weber2012-03-091-1/+2
| | | | llvm-svn: 152441
* [analyzer] Add support for NoRedundancy inlining mode.Anna Zaks2012-03-094-33/+55
| | | | | | | | | | | We do not reanalyze a function, which has already been analyzed as an inlined callee. As per PRELIMINARY testing, this gives over 50% run time reduction on some benchmarks without decreasing of the number of bugs found. Turning the mode on by default. llvm-svn: 152440
* CallGraph: Add getNode() method, constify.Anna Zaks2012-03-091-0/+4
| | | | llvm-svn: 152439
* Allow serializing an invalid ParmVarDecl and don't set access to public forArgyrios Kyrtzidis2012-03-092-9/+9
| | | | | | | | invalid ParmVarDecls. Part of rdar://11007039. llvm-svn: 152437
* Improve our semantic error recovery.Argyrios Kyrtzidis2012-03-092-10/+30
| | | | | | | | | | | | | | | | | When an error made a record member invalid, the record would stay as "isBeingDefined" and not "completeDefinition". Even easily recoverable errors ended up propagating records in such "beingDefined" state, for example: struct A { ~A() const; // expected-error {{'const' qualifier is not allowed on a destructor}} }; struct B : A {}; // A & B would stay as "not complete definition" and "being defined". This weird state was impending lookups in the records and hitting assertion in the ASTWriter. Part of rdar://11007039 llvm-svn: 152432
* [Sema] Remove dead getSourceRange() call, caught by Clang after markingDaniel Dunbar2012-03-091-2/+1
| | | | | | LLVM_READONLY. llvm-svn: 152428
* lldb support: under debugger support flag, when sending messageFariborz Jahanian2012-03-091-0/+12
| | | | | | | to forward class, and assigning to an 'id' type var, message sends default to 'id'. // rdar"//10988847 llvm-svn: 152420
* [AST/Sema/libclang] Replace getSourceRange().getBegin() with getLocStart().Daniel Dunbar2012-03-0910-157/+157
| | | | | | | | | - getSourceRange().getBegin() is about as awesome a pattern as .copy().size(). I already killed the hot paths so this doesn't seem to impact performance on my tests-of-the-day, but it is a much more sensible (and shorter) pattern. llvm-svn: 152419
* [AST] Define a few more key getLocStart() implementations.Daniel Dunbar2012-03-091-0/+18
| | | | | | | - This cuts the # of getSourceRange calls by 60% on OGF/NSBezierPath-OAExtensions.m. llvm-svn: 152412
* [AST] Reimplement Stmt::getLoc{Start,End} to dispatch to subclass overloads.Daniel Dunbar2012-03-092-1/+69
| | | | | | | | - getSourceRange() can be very expensive, we should try to avoid it if at all possible. In conjunction with the previous commit I measured a ~2% speedup on 403.gcc/combine.c and a 3% speedup on OmniGroupFrameworks/NSBezierPath-OAExtensions.m. llvm-svn: 152411
* [AST] Add {DeclRefExpr,MemberExpr,ImplicitCastExpr}::{getLocStart,getLocEnd} ↵Daniel Dunbar2012-03-091-14/+26
| | | | | | | | methods. - There are probably a lot more of these worth adding, but these are a start at hitting some of the exprs for which getSourceRange().getBegin() is a poor substitute for getLocStart(). llvm-svn: 152410
* [Basic] Rename LangOptions::NoInline to NoInlineDefine, to make things a bitDaniel Dunbar2012-03-092-2/+2
| | | | | | more obvious. llvm-svn: 152408
* -Wformat-non-iso: warn about positional arguments (pr12017)Hans Wennborg2012-03-092-2/+15
| | | | | | | | | This renames the -Wformat-non-standard flag to -Wformat-non-iso, rewords the current warnings a bit (pointing out that a format string is not supported by ISO C rather than being "non standard"), and adds a warning about positional arguments. llvm-svn: 152403
* Fix statement printing for raw and template user-defined literals.Richard Smith2012-03-091-6/+9
| | | | llvm-svn: 152401
OpenPOWER on IntegriCloud