summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Add clang-cc support for -disable-llvm-optzns.Daniel Dunbar2009-06-021-3/+18
| | | | | | | - Avoids running any LLVM optimizations, even at -O2, etc., while still keeping any language changes these optimizations imply. llvm-svn: 72742
* PR4288: Make -dD (dump macros with preprocessed source) play nicely with Eli Friedman2009-06-021-2/+7
| | | | | | # line directives. llvm-svn: 72724
* Unify coding style.Zhongxing Xu2009-06-011-1/+1
| | | | llvm-svn: 72682
* Use a reference to modify the DeclIDs map.Zhongxing Xu2009-06-011-1/+1
| | | | llvm-svn: 72681
* Unbreak the clang build by applying the same temporaryDuncan Sands2009-05-311-1/+2
| | | | | | | workaround for machine code emitter changes as was used in llvm-gcc. llvm-svn: 72657
* ActOnReturnStmt should also take a FullExprArg.Anders Carlsson2009-05-301-1/+1
| | | | llvm-svn: 72641
* AddInitializerToDecl needs to take a full expression.Anders Carlsson2009-05-301-1/+1
| | | | llvm-svn: 72640
* Pass an ASTContext into Stmt::printPretty.Eli Friedman2009-05-302-6/+6
| | | | llvm-svn: 72611
* Refactor and clean up the AST printer, so that it uses a DeclVisitor,Douglas Gregor2009-05-302-637/+18
| | | | | | | | | walks through DeclContexts properly, and prints more of the information available in the AST. The functionality is still available via -ast-print, -ast-dump, etc., and also via the new member functions Decl::dump() and Decl::print(). llvm-svn: 72597
* Create a new PrintingPolicy class, which we pass down through the ASTDouglas Gregor2009-05-294-29/+41
| | | | | | | | | printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. llvm-svn: 72590
* If a declarator group declares a type, make sure to add that declaration Eli Friedman2009-05-291-1/+2
| | | | | | to the DeclGroup. llvm-svn: 72559
* When we parse a tag specifier, keep track of whether that tagDouglas Gregor2009-05-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specifier resulted in the creation of a new TagDecl node, which happens either when the tag specifier was a definition or when the tag specifier was the first declaration of that tag type. This information has several uses, the first of which is implemented in this commit: 1) In C++, one is not allowed to define tag types within a type specifier (e.g., static_cast<struct S { int x; } *>(0) is ill-formed) or within the result or parameter types of a function. We now diagnose this. 2) We can extend DeclGroups to contain information about any tags that are declared/defined within the declaration specifiers of a variable, e.g., struct Point { int x, y, z; } p; This will help improve AST printing and template instantiation, among other things. 3) For C99, we can keep track of whether a tag type is defined within the type of a parameter, to properly cope with cases like, e.g., int bar(struct T2 { int x; } y) { struct T2 z; } We can also do similar things wherever there is a type specifier, e.g., to keep track of where the definition of S occurs in this legal C99 code: (struct S { int x, y; } *)0 llvm-svn: 72555
* Reintroduce the home for exception specs, and make Sema fill it. However, ↵Sebastian Redl2009-05-272-1/+14
| | | | | | keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere. llvm-svn: 72498
* Enumeration declarations that were instantiated from an enumerationDouglas Gregor2009-05-272-0/+2
| | | | | | | | within a template now have a link back to the enumeration from which they were instantiated. This means that we can now find the instantiation of an anonymous enumeration. llvm-svn: 72482
* Convert ObjC qualified type clients over to using iterators.Steve Naroff2009-05-271-4/+6
| | | | | | | | This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType. No functionality change. llvm-svn: 72475
* When evaluating a VarDecl as a constant or determining whether it isDouglas Gregor2009-05-261-1/+1
| | | | | | | | an integral constant expression, maintain a cache of the value and the is-an-ICE flag within the VarDecl itself. This eliminates exponential-time behavior of the Fibonacci template metaprogram. llvm-svn: 72428
* Add IEEE quad support to DefineFloatMacros.Eli Friedman2009-05-231-15/+22
| | | | llvm-svn: 72314
* PR4247: Widen the buffer slightly so it can hold all the definitions for Eli Friedman2009-05-231-1/+1
| | | | | | | | PPC double double. (No testcase because no normal target uses the format at the moment.) llvm-svn: 72310
* Fix lots of PCH crashes caused by the new assertions inDouglas Gregor2009-05-223-11/+12
| | | | | | | llvm::SmallVector, using data() instead of &[0]. The PCH testsuite now runs cleanly (again). llvm-svn: 72292
* Fix PCH crash caused by new assertions in llvm::SmallVector. UseTed Kremenek2009-05-221-1/+1
| | | | | | ProtoRefs.data() instead of &ProtoRefs[0] to access the raw buffer. llvm-svn: 72291
* This patch adds support for sender-aware dispatch in Objective-C for the GNU ↵Fariborz Jahanian2009-05-221-0/+3
| | | | | | | | | | runtime, when compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object planes, and a few other things. Patch by David Chisnall. llvm-svn: 72275
* Pull EmitRecord() out of loop. It should be called only once.Zhongxing Xu2009-05-221-1/+1
| | | | llvm-svn: 72252
* Fix CMake build for AST XML dumperDouglas Gregor2009-05-211-0/+2
| | | | llvm-svn: 72228
* AST XML dump, from Olaf Krzikalla!Douglas Gregor2009-05-213-0/+1022
| | | | llvm-svn: 72224
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-214-11/+11
| | | | llvm-svn: 72210
* implementation of format_arg for ObjC methods/functions.Fariborz Jahanian2009-05-202-0/+12
| | | | | | Still more to do. llvm-svn: 72173
* Build fixes for r72135.Eli Friedman2009-05-191-5/+5
| | | | llvm-svn: 72136
* Move AnalysisConsumer.h and Analyses.def from tools/clang-cc to Eli Friedman2009-05-192-0/+660
| | | | | | | include/clang/Frontend, and move AnalysisConsumer.cpp from tools/clang-cc to lib/Frontend. llvm-svn: 72135
* Add missing include for stderr and fprintf, neededDuncan Sands2009-05-191-0/+1
| | | | | | when compiling with gcc-4.4. llvm-svn: 72109
* Fix a crash with -emit-html from stdin.Eli Friedman2009-05-191-2/+11
| | | | llvm-svn: 72104
* Clean up some unnecessary includes.Eli Friedman2009-05-194-7/+1
| | | | llvm-svn: 72101
* CMake updates for r72099; untested, so please tell me if there are any Eli Friedman2009-05-191-3/+11
| | | | | | issues. llvm-svn: 72100
* Move clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp Eli Friedman2009-05-198-0/+2786
| | | | | | files to lib/Frontend. llvm-svn: 72099
* Attempted CMake build fixes for r72060; this is untested, so please tell Eli Friedman2009-05-181-0/+6
| | | | | | me if there are any issues. llvm-svn: 72063
* Move ASTConsumers.h to include/clang/Frontend, and move the associated Eli Friedman2009-05-186-0/+7456
| | | | | | .cpp files to lib/Frontend. (As proposed on cfe-dev.) llvm-svn: 72060
* "This patch fixes an obvious buffer overrun inDouglas Gregor2009-05-181-2/+2
| | | | | | SelectInterestingSourceRegion()," from Jay Foad! llvm-svn: 72049
* Remove unused parameter.Eli Friedman2009-05-181-1/+0
| | | | llvm-svn: 71996
* Template instantiation for IndirectGotoStmt. Now my life is complete.Douglas Gregor2009-05-162-0/+2
| | | | llvm-svn: 71917
* Template instantiation for switch statementsDouglas Gregor2009-05-152-0/+6
| | | | llvm-svn: 71916
* Template instantiation for "for" loopsDouglas Gregor2009-05-152-0/+4
| | | | llvm-svn: 71901
* Template instantiation for do-while statements.Douglas Gregor2009-05-152-0/+2
| | | | llvm-svn: 71899
* Template instantiation for "if" statements. Also:Douglas Gregor2009-05-152-0/+2
| | | | | | | | - Skip semantic analysis of the "if" condition if it is type-dependent. - Added the location of the "else" keyword into IfStmt, so that we can provide it for type-checking after template instantiation. llvm-svn: 71875
* When word-wrapping, be more defensive about a ridiculously small number of ↵Douglas Gregor2009-05-151-2/+4
| | | | | | columns. Fixes <rdar://problem/6892178> llvm-svn: 71870
* Fix processing of -Ufoo to not inject "#undef foo 1" into the predefinesChris Lattner2009-05-151-1/+11
| | | | | | | | | | | | | | | | buffer. This caused exciting nonsense like this: $ clang t.c -fsyntax-only -UMACRO In file included from <built-in>:104: <command line>:1:14: warning: extra tokens at end of #undef directive [-Wextra-tokens] #undef MACRO 1 ^ // 1 diagnostic generated. rdar://6891800 llvm-svn: 71860
* Check that the function being overridden is virtual.Anders Carlsson2009-05-142-2/+2
| | | | llvm-svn: 71802
* Improvements to the FunctionDecl getters/setters.Anders Carlsson2009-05-142-4/+4
| | | | llvm-svn: 71800
* Link FunctionDecls instantiated from the member functions of a classDouglas Gregor2009-05-142-0/+2
| | | | | | | | template to the FunctionDecls from which they were instantiated. This is a necessary first step to support instantiation of the definitions of such functions, but by itself does essentially nothing. llvm-svn: 71792
* Disable access control by default. It can be enabled with the ↵Anders Carlsson2009-05-132-0/+3
| | | | | | -faccess-control option. When we have better support for it, we can enable it by default again. llvm-svn: 71706
* Some early declarations to support sentinel attribute onFariborz Jahanian2009-05-132-0/+14
| | | | | | | message dispatches (and function calls later). No change in functionality. llvm-svn: 71683
* Make precompiled headers work with -E. When we're only preprocessingDouglas Gregor2009-05-122-11/+125
| | | | | | | (with -E), we turn the PCH include into an implicit include of the file from which the PCH file was generated. llvm-svn: 71534
OpenPOWER on IntegriCloud