aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-08-16Store SourceManager pointer on PrintingPolicy in the case where we're dumping,Richard Smith
and remove ASTContext reference (which was frequently bound to a dereferenced null pointer) from the recursive lump of printPretty functions. In so doing, fix (at least) one case where we intended to use the 'dump' mode, but that failed because a null ASTContext reference had been passed in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162011 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Don't constant-fold when pretty-printing alignment attribute. This fixes aRichard Smith
potential crasher -- Context is sometimes a null reference (!!) here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162007 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Test commit: deleted whitespace on blank lineSam Panzer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162006 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Fix misaligned allocation of QualifiedTempateName and DependentTemplateName.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162005 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Remove names from the CHECK lines.Tanya Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162003 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Convert loads and stores of vec3 to vec4 to achieve better code generation. ↵Tanya Lattner
Add test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16[ms-inline asm] Add inputs and outputs to AST. No functional change.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162000 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16[analyzer] Look through all casts when trying to track constraints.Jordan Rose
Previously, we were losing path notes (in both text and plist form) because the interesting DeclRefExpr was buried in a cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161999 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Devirtualize calls on glvalues produced by class member access expressions.Richard Smith
Based on a patch by Yin Ma! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161998 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Thread safety analysis: prevent a compiler error in cases where aDeLesley Hutchins
late-parsed attribute is attached to an invalid declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161997 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[analyzer] If we call a C++ method on an object, assume it's non-null.Jordan Rose
This is analogous to our handling of pointer dereferences: if we dereference a pointer that may or may not be null, we assume it's non-null from then on. While some implementations of C++ (including ours) allow you to call a non-virtual method through a null pointer of object type, it is technically disallowed by the C++ standard, and should not prune out any real paths in practice. [class.mfct.non-static]p1: A non-static member function may be called for an object of its class type, or for an object of a class derived from its class type... (a null pointer value does not refer to an object) We can also make the same assumption about function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161992 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Use a set container to remove redundant clobbers.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161991 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Address a FIXME by computing the number of asm statements whenChad Rosier
building the AsmString. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161988 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[analyzer] Even if we are not inlining a virtual call, still invalidate!Jordan Rose
Fixes a mistake introduced in r161916. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161987 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] MSVC parses multiple __asm statements on a single line as oneChad Rosier
statement. For example, if (x) __asm out dx, ax __asm out dx, ax results in a single inline asm statement (i.e., both "out dx, ax" statements are predicated on if(x)). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161986 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[analyzer] Correctly devirtualize virtual method calls in constructors.Jordan Rose
This is the other half of C++11 [class.cdtor]p4 (the destructor side was added in r161915). This also fixes an issue with post-call checks where the 'this' value was already being cleaned out of the state, thus being omitted from a reconstructed CXXConstructorCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161981 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Allow 'static' and type qualifiers in K&R parameter type lists.Matt Beaumont-Gay
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161980 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Don't emit newlines as these are ignored by the AsmParserChad Rosier
anyways. Also, simplify some conditional logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161977 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Add ASTMatcher for matching extern "C" function declarations.Daniel Jasper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161974 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Patch to warn about __private_extern__ on tentative definitionsFariborz Jahanian
as it does something unexpected (but gcc compatible). Suggest use of __attribute__((visibility("hidden"))) on declaration instead. // rdar://7703982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161972 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Fix for PR#13606: http://llvm.org/bugs/show_bug.cgi?id=13606John Criswell
Changed the alignment of an LValue to be 64 bits so that we can handle alignment values up to half of a 64-bit address space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161971 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier
This is a reapplication of r161914 now that the scoping issue has been resolved in r161966. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161967 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Capturing loop-scoped (std::string)Reg with a StringRef is bad.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161966 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Fix base type of ASTDeclNodeLister.Michael Han
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161963 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[analyzer] Don't try to devirtualize if the class is incomplete.Jordan Rose
A similar issue to the previous commit, introduced by r161915. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161961 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[analyzer] Only adjust the type of 'this' when we devirtualize a method call.Jordan Rose
With reinterpret_cast, we can get completely unrelated types in a region hierarchy together; this was resulting in CXXBaseObjectRegions being layered directly on an (untyped) SymbolicRegion, whose symbol was from a completely different type hierarchy. This was what was causing the internal buildbot to fail. Reverts r161911, which merely masked the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161960 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Add the left brace source location and improve the prettyChad Rosier
printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161958 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Check for improper use of 'static' and type qualifiers in arrayHans Wennborg
declarators. They are only allowed for function parameters, and then only on the outermost array type derivation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161934 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Revert this to try to bring the i386 bots back.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161931 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15clang/lib/Sema/SemaStmt.cpp: Include MCAsmLexer.h to appease msvc to define ↵NAKAMURA Takumi
llvm::AsmToken. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161927 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Use the right alignment when allocating NestedNameSpecifier objects.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161920 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Fix overallocation and underalignment of ASTTemplateArgumentListInfo objects.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[analyzer] Doxygen comments in ObjCMethodCall.Jordan Rose
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161917 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[analyzer] Don't inline dynamic-dispatch methods unless -analyzer-ipa=dynamic.Jordan Rose
Previously we were checking -analyzer-ipa=dynamic-bifurcate only, and unconditionally inlining everything else that had an available definition, even under -analyzer-ipa=inlining (but not under -analyzer-ipa=none). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161916 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[analyzer] Correctly devirtualize virtual method calls in destructors.Jordan Rose
C++11 [class.cdtor]p4: When a virtual function is called directly or indirectly from a constructor or from a destructor, including during the construction or destruction of the class’s non-static data members, and the object to which the call applies is the object under construction or destruction, the function called is the final overrider in the constructor's or destructor's class and not one overriding it in a more-derived class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161915 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161914 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Have MC start parsing the asms.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161913 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Mark getClobber() const.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161912 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[analyzer] A base class needs a complete definition to provide offsets.Jordan Rose
No test case yet; trying to reduce one from a failing internal buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161911 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14Check local static variables for self reference on initialization.Richard Trieu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161909 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14[ms-inline asm] More test cases to make sure buildMSAsmString() doesn't regress.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161908 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14[ms-inline asm] Remove the last bits of LineEnds.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161904 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14Remove trailing return flag from FunctionTypeLoc, since we now carry thatRichard Smith
information on FunctionProtoType. (This also fixes one of *many* misalignment problems in the TypeLoc hierarchy...) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161901 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14Fix undefined behavior: reference bound to dereferenced null pointer.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161899 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14[ms-inline asm] Simplify more logic by using the Token::hasLeadingSpace() andChad Rosier
Token::isAtStartOfLine() APIs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161898 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14Small change to avoid confusion on what "used by" means for a compiler.Rafael Espindola
Patch by Jonathan Sauer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161897 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14[ms-inline asm] Address a potential buffer overflow.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161896 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14[ms-inline asm] Simplify the logic in patchMSAsmString. We no longer need toChad Rosier
track the LineEnds now that single line asm statments aren't merged. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161893 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14irgen: inline code for several of complex builtinFariborz Jahanian
calls. // rdar://8315199 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161891 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14[ms-inline asm] Add a helpful assert.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161890 91177308-0d34-0410-b5e6-96231b3b80d8