aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2010-10-24Introduce a DeclsToRewrite field in ASTWrite, used for collecting the decls ↵Argyrios Kyrtzidis
that will be replaced in the chained PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117238 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-24Some method renaming, no functionality change.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-24Refactoring.Argyrios Kyrtzidis
- Pass around RecordDataImpl instead of the concrete RecordData so that any SmallVector can be used. - Move ASTDeclWriter::WriteCXXDefinitionData to ASTWriter::AddCXXDefinitionData. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117236 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-24Put the mechanism in place to track modifications in an AST entity that were ↵Argyrios Kyrtzidis
committed after its initial creation/deserialization and store the changes in a chained PCH. The idea is that the AST entities call methods on the ASTMutationListener to give notifications of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes of the updated entity. WIP git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-24Simplify and "robust-ify" the way that CXXRecord references point to the ↵Argyrios Kyrtzidis
definition data when loaded from PCH. Temporary disable 'test/PCH/chain-cxx.cpp' until a better way to fix it is in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-24Minor refactoring; Pull reading/writing DefinitionData out into a function.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-24- Fixed subexpressions evaluation order for binary operators to match order ↵Marcin Swiderski
in code generated with the compiler, - Fixed test cases for unreachable code warnings produced by Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117220 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-23C++ [basic.scope.hiding] allows an ordinary name to hide a non-tagDouglas Gregor
name *in the same scope*, but not across scopes. Implement the highlighted condition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117212 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-23Update remaining attribute macros to new style.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117204 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-23Update to use 'LLVM_*' macro names for attributes.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117201 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Warn if a variable marked with the "unused" attribute is used. Patch by ↵Anders Carlsson
Darin Adler! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117184 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Parse attributes on enumerators and instantiate attributes on enum decls.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117182 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22In the presence of using declarations, we can find the same classDouglas Gregor
members in class subobjects of different types. So long as the underlying declaration sets are the same, and the declaration sets involve non-instance members, this is not an ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Fix '-analyzer-display-progress' for Objective-C methods. Also remove ↵Ted Kremenek
obsolete code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22After discussion with Doug and John, I am revertingFariborz Jahanian
the patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117159 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Change handling of inline asm 'p' constraint to match llvm-gcc.Dale Johannesen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117149 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Substantially revise how clang computes the visibility of a declaration toJohn McCall
more closely parallel the computation of linkage. This gets us to a state much closer to what gcc emits, modulo bugs, which will undoubtedly arise in abundance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117147 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Patch fixes miscompile with non-trivial copy constructors and Fariborz Jahanian
statement expressions, //rdar: //8540501 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117146 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Delay record type's debug info emission, in -flimit-debug-info mode, if ↵Devang Patel
member expression's base is call expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117127 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Revert unintentional check-in.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Don't try to guess svn version when current path is a symlink.Oscar Fuentes
See PR 8473. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117110 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Tidy up MIPS_linkage name. Provide it only if it does not match regular ↵Devang Patel
name, otherwise it confuses debugger. This is tested by local.C in llvmgcc testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22More class anonymization.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22Move classes into anonymous namespaces.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117104 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22When performing name lookup for a namespace definition, only look intoDouglas Gregor
the current context's redeclaration context, ignoring using directives. Fixes PR8430. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117097 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Teach the C++ simple-type-specifier parser and tentative parses aboutDouglas Gregor
protocol-qualified types such as id<Protocol>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117081 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Rename clang's TBAA tree root from "experimental" to "simple".Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117046 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Tweak diagnostics for redeclaration of a @property in a class extension ↵Ted Kremenek
where the redelcaration and original declaration have the 'readwrite' attribute. This is a common case, and we can issue a more lucid diagnostic. Fixes <rdar://problem/7629420>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117045 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Tidy up comment (remove extraneous text).Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117044 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Add some more comments.Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117043 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Implement the integral promotion rules for the C++0x char16_t andDouglas Gregor
char32_t character types and enable built-in overloaded operator candidates for these types. Fixes PR8432. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117038 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Diagnose the declaration of template template parameters thatDouglas Gregor
themselves have no template parameters. This is actually a restriction due to the grammar of template template parameters, but we choose to diagnose it in Sema to provide better recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Always treat 'main' as an extern "C" function, so that we detectDouglas Gregor
redeclarations of main appropriately rather than allowing it to be overloaded. Also, disallowing declaring main as a template. Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117029 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21When checking whether a return statement returns a stack-localDouglas Gregor
variable, handle conditional operators involving a throw-expression. Fixes GCC DejaGNU's g++.dg/template/cond4.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117027 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Revert r117005, WIN32 is not predefined after all.Francois Pichet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117026 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Tweak the ObjCAtSyncChecker to assume that a mutex is non-nil after checking ↵Ted Kremenek
that it is nil. Otherwise we can get false paths where a second @synchronized using the mutex can have a bogus warning. Fixes <rdar://problem/8578650>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117016 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21MSVC defines WIN32 as a predefined macro.Francois Pichet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117005 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Targets: Fix MinGW and VisualStudio predefined macros.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117003 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Reorganize predefined macros for all Windows targets.Michael J. Spencer
This adds an option to set the _MSC_VER macro without recompiling. This is very useful when testing compatibility with the Windows SDK and c++stdlib headers. -fmsc-version=<version> (defaults to VS2003 (1300)) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116999 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Previously, the printf warnings would say your arguments type was 'int' when ↵Ted Kremenek
it was really a 'char' or a 'short'. This fixes that and allows the hints to suggest 'h' modifiers for small ints. Patch by Justin Bogner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116996 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Remove unused variable.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116995 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Fix Whitespace.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Revert "Cleanup and fix predefined macros for windows."Michael J. Spencer
Didn't realize this was on my branch ;/. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116989 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Cleanup and fix predefined macros for windows.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116988 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Pass TInfo to CXXDestructorDecl::Create(), just like we do for otherCraig Silverstein
function decls. Reviewed by rjmccall and nlewycky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116979 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20When implicit members are added to a C++ record, notify the serializer so ↵Argyrios Kyrtzidis
that a chained PCH writes the definition again. Thanks to Doug for the hint! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20Modify the assumptions of an assert; the updated latest redeclaration can ↵Argyrios Kyrtzidis
have the same location if it's a template specialization pointing at the template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20Remove obsolete GRAuditor and GRSimpleAPICheck, which have been completely ↵Ted Kremenek
subsumed by the Checker interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116973 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20Convert GRSimpleAPIChecks in BasicObjCFoundationChecks to be Checkers.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116971 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20Extend the preprocessing record and libclang with support forDouglas Gregor
inclusion directives, keeping track of every #include, #import, etc. in the translation unit. We keep track of the source location and kind of the inclusion, how the file name was spelled, and the underlying file to which the inclusion resolved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116952 91177308-0d34-0410-b5e6-96231b3b80d8