aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-05-13Don't add a null successor to a CFGBlock when the contents of an ↵Ted Kremenek
@synchronized statement is empty. Fixes <rdar://problem/7979430>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103717 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Fold assertion into condition, as it does not hold all the time.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103716 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Testcase for r103712.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103713 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Teach the AKA calculation to look at sugar on the pointee type for pointers andChandler Carruth
references. This is a WIP as we should handle function pointers, etc. Reshuffle the code to do this to facilitate recursing in this manner, and to check for the type already being printed first rather than last. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Rebuild builtin_id * as an ObjCObjectPointerType, where builtin_id is theJohn McCall
magic type that 'id' is a pointer to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Relax an assertion. Various cases could lead to non-symbol values.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103707 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13When performing template argument deduction, match Objective C pointersJohn McCall
against pointer patterns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Delete a dead function at sabre's request.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Update the types for warning option subgroup arrays to 'short', we have moreChandler Carruth
than 127 groups so this was already failing given -fsigned-char. A subsequent to commit to TableGen will generate shorts for the arrays themselves. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Add test case for <rdar://problem/7880658>.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103701 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Remove stale comment.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103696 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13add a couple of key functions for classes without them.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Specially handle CaseStmts in CursorVisitor because they can be nested and ↵Ted Kremenek
walking them can blow out the stack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12If given location is invalid then use current location.Devang Patel
This fixes recent regressions reported by gdb testsuite. Tighter verification of debug info generated by FE found these regressions. Refactor code to extract line number and column number from SourceLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103678 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Objective-C++ Sema. Support for conversion of a C++Fariborz Jahanian
class object used as a receiver to an objective-c pointer via a converwsion function. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103672 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12"this patch properly addresses escaping < and > which might appearChris Lattner
(e.g. for C++ operators) in the xml dump. I also re-enabled the unit test for ast-print-xml (or so I think) at least, make test didn't fail..." patch by Sebastien Binet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12improve comments.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Revert "Move macro definitions for IBOutlet and IBAction into the sourceDaniel Dunbar
code. ...", this was a lit bug which should be fixed in r103652. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103654 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Move macro definitions for IBOutlet and IBAction into the source code. This ↵Ted Kremenek
hopefully unbreaks the test with lit+Windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103650 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Driver/Darwin/i386: Don't allow compiling C++ with -fapple-kext, we don't ↵Daniel Dunbar
support the necessary ABI yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103632 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Simplify.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Objective-C++ Sema - Allow static_cast of one objc pointer toFariborz Jahanian
another. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103630 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Whenever we instantiate a function definition or class, enter a newDouglas Gregor
potentially-evaluated expression context, to ensure that used declarations get properly marked. Fixes PR7123. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12When we emit an error during the implicit definition of a specialDouglas Gregor
member function (default constructor, copy constructor, copy assignment operator, destructor), emit a note showing where that implicit definition was required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103619 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Yes another annotate-tokens tweak.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Increase test portability.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Make test portable.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103588 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Make test case invariant to macro definition location.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103587 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Re-apply r103581 with updated tests. It turns out we were computing bogus ↵Ted Kremenek
locations for many things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Temporarily revert r103581 so I can fix the failing tests.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Correctly check if a cursor is a declaration before returning its ↵Ted Kremenek
location/range in clang_getCursorLocation()/clang_getCursorExtent(). This fixes a horrible bug reported in <rdar://problem/7961995> and <rdar://problem/7967123> where declarations with attributes would get grossly annotated with the wrong tokens because the attribute would be interpreted as if it was a Decl*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Remove debugging aids I did not intend to commit.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103578 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Adjust clang_annotateTokens() to correctly account for the TypeSourceInfo ↵Ted Kremenek
for DeclaratorDecls when annotating tokens. Fixes <rdar://problem/7971430>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103577 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12don't force 16 threads.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103566 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Improve commentary on the indirect-goto jump scope checker and extractJohn McCall
a convenience routine to find the innermost common ancestor of two scopes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103565 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Correct spelling of expected error message. Apparently I forgot to re-runJohn McCall
the test suite after modifying this diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12When checking scopes for indirect goto, be more permissive (but still safe)John McCall
about the permitted scopes. Specifically: 1) Permit labels and gotos to appear after a prologue of variable initializations. 2) Permit indirect gotos to jump out of scopes that don't require cleanup. 3) Diagnose possible attempts to indirect-jump out of scopes that do require cleanup. This requires a substantial reinvention of the algorithm for checking indirect goto. The current algorithm is Omega(M*N), with M = the number of unique scopes being jumped from and N = the number of unique scopes being jumped to, with an additional factor that is probably (worst-case) linear in the depth of scopes. Thus the entire thing is likely cubic given some truly bizarre ill-formed code; on well-formed code the additional factor collapses to an amortized constant (when amortized over the entire function) and so the algorithm is quadratic. Even this requires every label to appear in its own scope, which would be very unusual for indirect-goto code (and extremely unlikely for well-formed code); it is far more likely that all labels will be in the same scope and so the algorithm becomes linear. For such a marginal feature, I am fairly happy with this result. (this is using JumpDiagnostic's definition of scope, where successive variables in a block appear in their own scope) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103536 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12Use end location of DeclStmt to mark stop point. Devang Patel
This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103533 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11BoostCon tutorial notes, temporaryDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11Merged Elaborated and QualifiedName types.Abramo Bagnara
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11Speculatively revert r103497, "Do not mark the virtual members of anDaniel Dunbar
implicitly-instantiated class as ...", which seems to have broken bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11IRgen/i386/C++: Fix isSingleElementStruct computation for C++ record decls.Daniel Dunbar
- Fixes PR7098. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11Do not mark the virtual members of an implicitly-instantiated class asDouglas Gregor
referenced unless we see one of them defined (or the key function defined, if it as one) or if we need the vtable for something. Fixes PR7114. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103497 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11VISIBILITY_HIDDEN was renamed LLVM_LIBRARY_VISIBILITY.Duncan Sands
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103494 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11Fix test.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103487 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11It's bad form to create VarDecl's without DeclContextsDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11The C++98/03 standard is disturbingly silent about out-of-scopeDouglas Gregor
explicit instantiations of template. C++0x clarifies the intent (they're ill-formed in some cases; see [temp.explicit] for details). However, one could squint at the C++98/03 standard and conclude they are permitted, so reduce the error to a warning (controlled by -Wc++0x-compat) in C++98/03 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11Static data members intialized in-class that have constant values areDouglas Gregor
value-dependent if their initializers are value-dependent; my recent tweak to these dependent rules overstepped by taking away this value-dependents. Fixes a Boost.GIL regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103476 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11Minor refactoring of my last patch.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11Fix indentationDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103465 91177308-0d34-0410-b5e6-96231b3b80d8