aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-11-23UndefBranchChecker: more bug reporter helper information emit.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89643 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23Initial refactor of UndefBranchChecker. We still use GRBranchNodeBuilderZhongxing Xu
in the checker directly. But I don't have a better approach for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23Encapsulate "an array of TemplateArgumentLocs and two angle bracket ↵John McCall
locations" into a new class. Use it pervasively throughout Sema. My fingers hurt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23Change Clang-Code-Compile tests to only -emit-llvm instead of runningDaniel Dunbar
codegen/as. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89634 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23Teach CodeGenFunction::EmitDecl to ignore Using and UsingShadow decls.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22x86_64, PR5582: Layout bases for C++ records.Daniel Dunbar
- Ideally we would have an single iteration interface for this, but this works for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Recognize .hpp as a C++ header.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89630 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Add clang -cc1 parsing of analyzer options.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89629 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22CMake: Add support for running tests with valgrind.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89625 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Fix LookupResult's sanity-check to handle shadow decls.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89624 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Change CheckDeadStores to use Expr::isNullPointerConstant, which will ↵Ted Kremenek
correctly determine whether an expression is a null pointer constant. Patch by Kovarththanan Rajaratnam! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Use EmitStoreOfScalar when copying the scalar to the space allocated by 'new'.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89613 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22When laying out bitfields, make sure that the data size is always aligned to ↵Anders Carlsson
a byte. This fixes PR5580. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Update a test to FileCheck.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89610 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Use intptr_t from stdint.h (in freestanding mode) instead of redefining it hereKen Dyck
with __INTPTR_TYPE__. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89609 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Test case for bug fixed in r89457.David Chisnall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89605 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Move bit-field layout out into a separate function. No functionality change.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Fix for PR5233.Edward O'Callaghan
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89603 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Define SIG_ATOMIC_MIN and SIG_ATOMIC_MAX in terms of __SIG_ATOMIC_WIDTH__.Ken Dyck
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Define __SIG_ATOMIC_WIDTH__ for use in stdint.h.Ken Dyck
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89597 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Undefined compound assignment result is checked in ↵Zhongxing Xu
UndefinedAssignmentChecker. So this check is redundant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Remove invalid comments. The result is undefined only when operands are ↵Zhongxing Xu
undefined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89591 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Save and restore the HasGen flag in MallocChecker.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89590 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Don't include a dead header.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89587 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Remove UndefinedAssignmentChecker's header.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Use intptr_t rather than long so that this test will not fail on LLP64 systems,Sean Hunt
where long is only 32-bits and so a reinterpret_cast would be ill-formed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22If a C++ qualified id is followed by a postfix suffix, it is never the directJohn McCall
operand of an addressof operator, and so we should not treat it as an abstract member-pointer expression and therefore suppress the implicit member access. This is really a well-formedness constraint on expressions: a DeclRefExpr of a FieldDecl or a non-static CXXMethodDecl (or template thereof, or unresolved collection thereof) should not be allowed in an arbitrary location in the AST. Arguably it shouldn't be allowed anywhere and we should have a different expr node type for this. But unfortunately we don't have a good way of enforcing this kind of constraint right now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Reorganize the intermediate BuildDeclarationNameExpr routines again.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89575 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22Consider a FunctionTemplate to be an overload all on its lonesome. TrackJohn McCall
this information through lookup rather than rederiving it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89570 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Support emitting aggregate class initializers. Fixes PR5581.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89569 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21This patch implements objective-c's 'SEL' type as a built-inFariborz Jahanian
type and fixes a long-standing code gen. crash reported in at least two PRs and a radar. (radar 7405040 and pr5025). There are couple of remaining issues that I would like for Ted. and Doug to look at: Ted, please look at failure in Analysis/MissingDealloc.m. I have temporarily added an expected-warning to make the test pass. This tests has a declaration of 'SEL' type which may not co-exist with the new changes. Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp. I think the changes which I have ifdef'ed out are correct. They need be considered for in a few Indexer/PCH test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89561 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Make FixedAddressChecker and experimental check; it currently produces a ton ↵Ted Kremenek
of false positives when analyzing some projects (e.g., Wine). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89560 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Fix 80-cols violation.Sean Hunt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Overload resolution doesn't decide whether to do ADL or not anymore; stoppingJohn McCall
threading that state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89557 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Mangler: Sketch mangling for TemplateArgument::Declaration kind.Daniel Dunbar
- Several important FIXMEs related to whether arguments are expressions or external names, and the mangling of extern "C" names (c.f., PR5522). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89556 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Mangler: Lift shouldMangleDeclName predicate out of CXXNameMangler::mangle.Daniel Dunbar
- Sometimes we have to mangle things we wouldn't normally (e.g., because they appear in a template expression). - This also tidies up the predicate to be more obvious what is getting mangled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Mangler: Strengthen invariants, MangleContext::mangleName should only be ↵Daniel Dunbar
called on var or function decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89554 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Mangler: Inline a bunch of functions into their sole caller, not that I ↵Daniel Dunbar
don't love typing for typings sake, but... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21DeclPrinter: Indent access specifiers.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89552 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Remove dead variable.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89551 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Mangler: Split isStdNamespace for when the caller already has a NamespaceDecl.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89550 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21IRgen: Eliminate CXXNameMangler::mangleCXX{C,D}tor.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89549 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,Daniel Dunbar
instead of requiring clients to make a raw_svector_ostream, which is just an implementation detail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89548 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Sink free mangle* methods into MangleContext.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89547 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Add 1+2 consts.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89546 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Delete trailing space.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21"Incremental" progress on using expressions, by which I mean totally rippingJohn McCall
into pretty much everything about overload resolution in order to wean BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the idea of a non-member lookup that we haven't totally resolved yet, whether by overloading, argument-dependent lookup, or (eventually) the presence of a function template in the lookup results. Incidentally fixes a problem with argument-dependent lookup where we were still performing ADL even when the lookup results contained something from a block scope. Incidentally improves a diagnostic when using an ObjC ivar from a class method. This just fell out from rewriting BuildDeclarationNameExpr's interaction with lookup, and I'm too apathetic to break it out. The only remaining uses of OverloadedFunctionDecl that I know of are in TemplateName and MemberExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89544 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Added rudimentary C++0x attribute support.Sean Hunt
The following attributes are currently supported in C++0x attribute lists (and in GNU ones as well): - align() - semantics believed to be conformant to n3000, except for redeclarations and what entities it may apply to - final - semantics believed to be conformant to CWG issue 817's proposed wording, except for redeclarations - noreturn - semantics believed to be conformant to n3000, except for redeclarations - carries_dependency - currently ignored (this is an optimization hint) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Add RegionStore test case that shows that floating point values are also ↵Ted Kremenek
implicitly tracked for undefined values. (test case for <rdar://problem/6811085>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89538 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Fix refacto, gcc's cc1 needs to see --output-pch=, which is not just an aliasDaniel Dunbar
for -output-pch=. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89534 91177308-0d34-0410-b5e6-96231b3b80d8