summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* __OBJC__ is also a standard predefined macro.Nick Lewycky2011-06-101-1/+3
| | | | llvm-svn: 132855
* The macros defined by the language standard are still available even when theNick Lewycky2011-06-071-26/+37
| | | | | | | -undef flag is passed in. Also __ASSEMBLER__ with -x assembler-with-cpp. (Don't ask.) llvm-svn: 132708
* Fix cmake build.Rafael Espindola2011-06-041-1/+0
| | | | llvm-svn: 132653
* Remove the old implementation of -verify, which has been dead code since r88750.Richard Smith2011-06-041-301/+0
| | | | llvm-svn: 132651
* Don't warn about -Wno-foo where foo is an unknown warning option. ExplicitlyMatt Beaumont-Gay2011-06-031-1/+3
| | | | | | passing -Wunknown-warning-option will re-enable warnings about -Wno-foo. llvm-svn: 132570
* Separate out these paths a bit by architecture. There are likely otherEric Christopher2011-06-031-2/+3
| | | | | | places this is a problem. llvm-svn: 132542
* Add multi-arch include support for Ubuntu 11.11 with gcc 4.6.0.Eric Christopher2011-06-031-0/+23
| | | | | | | | Patch by Tobias Hunger! Fixes PR10008 llvm-svn: 132541
* Implement -fgnu89-inline. Fixes PR10041.Rafael Espindola2011-06-021-0/+3
| | | | llvm-svn: 132460
* Change the include stack of "instantiated from" notes to fall under the ↵Richard Trieu2011-05-261-1/+1
| | | | | | control of f/fno-diagnostics-show-note-include-stack flags. This should help with reducing diagnostic spew from macros instantiations. llvm-svn: 132143
* A StringRef-ication of the DiagnosticIDs API and internals.Argyrios Kyrtzidis2011-05-252-29/+24
| | | | | | | | | Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static diagnostic data structures, which resulted in a huge global-var-init function. Depends on llvm commit r132046. llvm-svn: 132047
* Make it possible for external tools to distinguish between paths that come ↵Nico Weber2011-05-241-2/+4
| | | | | | from -I and paths that come from -system. Patch from Paul Holden! llvm-svn: 131955
* Fix the clang part of PR7952: rewrite the specialization of isa<> in DeclBase,Eli Friedman2011-05-211-1/+1
| | | | | | and stop abusing the multi-level dereference isa<> used to allow. llvm-svn: 131804
* Introduce the -fdiagnostics-format=xxx option to control how ClangDouglas Gregor2011-05-212-10/+45
| | | | | | | | | | | | prints the file, line, and column of a diagnostic. We currently support Clang's normal format, MSVC, and Vi formats. Note that we no longer change the diagnostic format based on -fms-extensions. Patch by Andrew Fish! llvm-svn: 131794
* Add paths used by openSuSE 12.1David Chisnall2011-05-191-0/+5
| | | | | | Patch by Ismail Dönmez! llvm-svn: 131636
* Add some support for RHEL5 systems.Eric Christopher2011-05-171-0/+7
| | | | llvm-svn: 131505
* 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
OpenPOWER on IntegriCloud