summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Add a FIXME.Francois Pichet2011-05-091-0/+1
| | | | llvm-svn: 131108
* Temporary preprocessor hack to get around the Microsoft __identifier(x) ↵Francois Pichet2011-05-071-0/+1
| | | | | | | | | | | extension. http://msdn.microsoft.com/en-us/library/hzc8ytsz(v=VS.100).aspx Microsoft doc claims this is a C++/CLI feature but it is really always enabled. This removes 2 error when parsing MFC code with clang. llvm-svn: 131051
* Modify some deleted function methods to better reflect reality:Alexis Hunt2011-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | - New isDefined() function checks for deletedness - isThisDeclarationADefinition checks for deletedness - New doesThisDeclarationHaveABody() does what isThisDeclarationADefinition() used to do - The IsDeleted bit is not propagated across redeclarations - isDeleted() now checks the canoncial declaration - New isDeletedAsWritten() does what it says on the tin. - isUserProvided() now correct (thanks Richard!) This fixes the bug that we weren't catching void foo() = delete; void foo() {} as being a redefinition. llvm-svn: 131013
* Introduce a new libclang parsing flag,Douglas Gregor2011-05-062-3/+14
| | | | | | | | | | | | | CXTranslationUnit_NestedMacroInstantiations, which indicates whether we want to see "nested" macro instantiations (e.g., those that occur inside other macro instantiations) within the detailed preprocessing record. Many clients (e.g., those that only care about visible tokens) don't care about this information, and in code that uses preprocessor metaprogramming, this information can have a very high cost. Addresses <rdar://problem/9389320>. llvm-svn: 130990
* Frontend: Fix a crash in CC_LOG_DIAGNOSTICS handling.Daniel Dunbar2011-05-051-2/+2
| | | | llvm-svn: 130909
* Preserve the full name of the file, so that '-c -o foo.pic.o' producesNick Lewycky2011-05-051-1/+1
| | | | | | foo.pic.gcno instead of foo.gcno. llvm-svn: 130899
* Change cycle detection to be based off of a warning flag.Alexis Hunt2011-05-051-5/+0
| | | | llvm-svn: 130898
* ASTUnit::LoadFromASTFile(): recover the resources from an ASTReader if it ↵Ted Kremenek2011-05-041-0/+10
| | | | | | crashes during PCH validation. llvm-svn: 130886
* Record where the GCOV data files should be placed.Nick Lewycky2011-05-041-0/+1
| | | | llvm-svn: 130866
* Add C++ include paths for libstdc++ with Ubuntu 11.04 and Debian's ↵Axel Naumann2011-05-041-0/+10
| | | | | | | | libstdc++6-4.5, as collected from http://packages.ubuntu.com/search?mode=exactfilename&suite=natty&section=all&arch=any&searchon=contents&keywords=c%2B%2Blocale.h and http://packages.debian.org/wheezy/armel/libstdc++6-4.5-dev/filelist Fixes compilation with clang++ on Ubuntu 11.04. llvm-svn: 130837
* Implement a better version of delegating constructor cycle detection.Alexis Hunt2011-05-041-0/+5
| | | | | | | | | | | | | This is more efficient as it's all done at once at the end of the TU. This could still get expensive, so a flag is provided to disable it. As an added bonus, the diagnostics will now print out a cycle. The PCH test is XFAILed because we currently can't deal with a note emitted in the header and I, being tired, see no other way to verify the serialization of delegating constructors. We should probably address this problem /somehow/ but no good solution comes to mind. llvm-svn: 130836
* Introduce ASTUnit::LoadFromCompilerInvocationAction that allows one to ↵Argyrios Kyrtzidis2011-05-031-0/+113
| | | | | | | | | create an ASTUnit from a CompilerInvocation along with an ASTFrontendAction to invoke, and without all the goo about the precompiled preamble. llvm-svn: 130805
* When using -std= flag added check to make sure language and standard are ↵Chad Rosier2011-05-021-0/+34
| | | | | | compatable llvm-svn: 130710
* lib/Frontend/InitHeaderSearch.cpp: Tweak AddPath() to accept "/foo/bar" (not ↵NAKAMURA Takumi2011-05-021-0/+5
| | | | | | | "X:\foo\bar") with -isysroot. test/PCH/reloc.c can pass. FIXME: We should consider better isysroot scheme on Win32 hosts. llvm-svn: 130683
* Implement -fno-dwarf2-cfi-asm.Rafael Espindola2011-04-301-0/+3
| | | | llvm-svn: 130616
* Removed redundant case statementsChad Rosier2011-04-301-2/+0
| | | | llvm-svn: 130564
* Add -Oz option and use it to set the inline threshold to 25.Bob Wilson2011-04-291-3/+4
| | | | | | Radar 9333566. Patch by Chad Rosier! llvm-svn: 130554
* Add a decl update when a static data member of a class template is ↵Sebastian Redl2011-04-291-0/+6
| | | | | | instantiated in a different PCH than its containing class. Otherwise we get double definition errors. Fixes a Boost.MPL problem that affects Boost.Accumulators and probably a lot more of Boost. llvm-svn: 130488
* Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin ↵Francois Pichet2011-04-281-6/+0
| | | | | | | | | | | | | | defines to real types. Otherwise statements like: __int64 var = __int64(0); would be expanded to: long long var = long long(0); and fail to compile. llvm-svn: 130369
* Add libstdc++ search paths for GCC 4.6.0 on Arch Linux. Patch by Jakub ↵Nico Weber2011-04-251-0/+7
| | | | | | Wieczorek. llvm-svn: 130152
* Synthesizing the definition of an implicit member is an AST modification, so ↵Sebastian Redl2011-04-241-0/+6
| | | | | | notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug. llvm-svn: 130103
* Move all of the logic for __DEPRECATED to the driver based on commentsChandler Carruth2011-04-232-4/+5
| | | | | | from dgregor. llvm-svn: 130066
* Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. ThisChandler Carruth2011-04-232-1/+9
| | | | | | | | | | | | | | | | | | matches GCC behavior which libstdc++ uses to limit #warning-based messages about deprecation. The machinery involves threading this through a new '-fdeprecated-macro' flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We turn the flag off in the driver when the warning is turned off (modulo matching some GCC bugs). We record this as a language option, and key the preprocessor on the option when introducing the define. A separate flag rather than a '-D' flag allows us to properly represent the difference between C and C++ builds (only C++ receives the define), and it allows the specific behavior of following -Wdeprecated without potentially impacting the set of user-provided macro flags. llvm-svn: 130055
* There were some frustrating problems with the implementation ofChandler Carruth2011-04-231-2/+3
| | | | | | | | | | | | | | | | | | | | -Wwrite-strings. First and foremost, once the positive form of the flag was passed, it could never be disabled by passing -Wno-write-strings. Also, the diagnostic engine couldn't in turn use -Wwrite-strings to control diagnostics (as GCC does) because it was essentially hijacked to drive the language semantics. Fix this by giving CC1 a clean '-fconst-strings' flag to enable const-qualified strings in C and ObjC compilations. Corresponding '-fno-const-strings' is also added. Then the driver is taught to introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings' dominates. This entire flag is basically GCC-bug-compatibility driven, so we also match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm open to changing this though as it seems insane. llvm-svn: 130051
* Add -fdelayed-template-parsing option. Using this option all templated ↵Francois Pichet2011-04-221-0/+6
| | | | | | | | | function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup. Using this flag is necessary for compatibility with Microsoft template code. This also provides some parsing speed improvement. llvm-svn: 130022
* Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (atNick Lewycky2011-04-211-0/+6
| | | | | | | | | compile time) and .gcda emission (at runtime). --coverage enables both. This does not yet add the profile_rt library to the link step if -fprofile-arcs is enabled when linking. llvm-svn: 129956
* PR9772: Fix the definition of WINT_MIN and WINT_MAX on Linux -ffreestanding.Eli Friedman2011-04-211-0/+3
| | | | llvm-svn: 129907
* ADT/Triple: Switch to using .isOSDarwin() predicate.Daniel Dunbar2011-04-191-28/+31
| | | | llvm-svn: 129823
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-152-0/+10
| | | | | | Monrocq llvm-svn: 129614
* Fixes a crash when generating dependency file stuffFariborz Jahanian2011-04-151-1/+1
| | | | | | and output file is not writable. // rdar://9286457. llvm-svn: 129587
* Support for C++11 (non-template) alias declarations.Richard Smith2011-04-151-2/+3
| | | | llvm-svn: 129567
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* C1X: add a language standardPeter Collingbourne2011-04-151-0/+1
| | | | llvm-svn: 129553
* Chained PCH: Remember when additional specializations are added to a ↵Sebastian Redl2011-04-141-0/+7
| | | | | | function template from a previous PCH. Fixes the only crasher when using massive chains on Clang's Sema component. We still have some incomplete codegen there. llvm-svn: 129516
* Fix -H. It was pretty broken.Sebastian Redl2011-04-141-5/+9
| | | | llvm-svn: 129514
* Fix a bunch of major problems with __unknown_anytype and properly testJohn McCall2011-04-091-0/+3
| | | | | | for them. The only major missing feature is references. llvm-svn: 129234
* accept -x objc-cpp-output as an alias for -x objective-c-cpp-output,Chris Lattner2011-04-091-0/+1
| | | | | | per PR9577 llvm-svn: 129201
* Frontend/CC_LOG_DIAGNOSTICS: Fix thinko and open diag log in append mode.Daniel Dunbar2011-04-071-1/+1
| | | | llvm-svn: 129103
* Fronted/CC_LOG_DIAGNOSTICS: Wire up dwarf-debug-flags support.Daniel Dunbar2011-04-071-5/+10
| | | | llvm-svn: 129095
* Fronted/CC_LOG_DIAGNOSTICS: Output main file name, and add support forDaniel Dunbar2011-04-071-2/+19
| | | | | | outputting dwarf-debug-flags. llvm-svn: 129094
* Fronted/CC_LOG_DIAGNOSTICS: Tweak output form to be plist chunks, and don'tDaniel Dunbar2011-04-071-11/+25
| | | | | | output missing data. llvm-svn: 129093
* Frontend: Continue flushing out LogDiagnosticPrinter.Daniel Dunbar2011-04-071-5/+81
| | | | llvm-svn: 129091
* Frontend: Sketch a LogDiagnosticPrinter object, and wire CC_LOG_DIAGNOSTICS toDaniel Dunbar2011-04-073-0/+72
| | | | | | it. llvm-svn: 129089
* Frontend: Sketch support for -diagnostic-log-file, which still doesn't do ↵Daniel Dunbar2011-04-071-0/+5
| | | | | | anything. llvm-svn: 129086
* Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.Eric Christopher2011-04-061-0/+5
| | | | | | Patch by Bobby Powers llvm-svn: 129014
* Also update CMakeList.txtArgyrios Kyrtzidis2011-04-041-0/+1
| | | | llvm-svn: 128854
* Add missing file for my previous commit.Argyrios Kyrtzidis2011-04-041-0/+90
| | | | llvm-svn: 128853
* Move Driver::createInvocationFromArgs function to Frontend library to avoid ↵Argyrios Kyrtzidis2011-04-041-1/+1
| | | | | | | | dependency cycle between libFrontend and libDriver. llvm-svn: 128852
* Introduce Driver::createInvocationFromArgs used to create a ↵Argyrios Kyrtzidis2011-04-041-52/+4
| | | | | | CompilerInvocation from command-line args. llvm-svn: 128848
* Remove a redundant isValid() checkMatt Beaumont-Gay2011-03-311-1/+1
| | | | llvm-svn: 128606
OpenPOWER on IntegriCloud