summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Be more careful about updating the failed-modules setDouglas Gregor2013-01-101-2/+3
| | | | llvm-svn: 172035
* Make sure clang puts tokens from different files on separate lines in "-E ↵Eli Friedman2013-01-091-1/+4
| | | | | | | | -P" mode. <rdar://problem/12774044> llvm-svn: 171944
* Remove -Wmodule-build; it was a dumb idea anyway. <rdar://problem/12957525>Douglas Gregor2013-01-041-2/+0
| | | | llvm-svn: 171478
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-021-1/+1
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
* s/CPlusPlus0x/CPlusPlus11/gRichard Smith2013-01-023-4/+4
| | | | llvm-svn: 171367
* [ubsan] Recover by default, use -fno-sanitize-recover to disable.Will Dietz2012-12-301-1/+1
| | | | llvm-svn: 171264
* Support -fsanitize-memory-track-origins.Evgeniy Stepanov2012-12-241-0/+2
| | | | llvm-svn: 171020
* DiagnosticRenderer.cpp: Prune one description in ↵NAKAMURA Takumi2012-12-241-1/+0
| | | | | | | | DiagnosticRenderer::emitMacroExpansions(). [-Wdocumentation] /// \param MacroSkipEnd The depth to stop skipping macro expansions. llvm-svn: 171012
* [libclang] Don't try to translate diagnostics from the precompiled preamble ↵Argyrios Kyrtzidis2012-12-221-11/+0
| | | | | | | | | | | to the code-completion results, the SourceManager state may be slightly different when code-completing. And we don't even care for diagnostics when code-completing, anyway. llvm-svn: 170979
* Sort the includes according to the coding standard.Roman Divacky2012-12-211-1/+1
| | | | llvm-svn: 170905
* Remove duplicate includes.Roman Divacky2012-12-211-1/+0
| | | | llvm-svn: 170903
* Simplify logic to use SourceManager::getFileLoc(), per Argyrios's feedback.Ted Kremenek2012-12-191-4/+2
| | | | llvm-svn: 170487
* Be defensive when printing module import locations; the diagnostic printer ↵Douglas Gregor2012-12-181-1/+1
| | | | | | needs to be robust llvm-svn: 170466
* More conservative fix for <rdar://problem/12847524> (a crash printing ↵Eli Friedman2012-12-181-0/+7
| | | | | | | | diagnostic ranges). I'm not really happy with this fix, but I'm confident it's correct. llvm-svn: 170397
* Revert 170049 because it fails with an assertion on one of the spec2000 ↵Nadav Rotem2012-12-131-72/+24
| | | | | | workloads. llvm-svn: 170143
* More hacking on mapDiagnosticRanges to make it handle more cases.Eli Friedman2012-12-131-24/+72
| | | | | | | | | | | | | | | | | | | | | | | | This still isn't quite right, but it fixes a crash. I factored out findCommonParent because we need it on the result of getImmediateExpansionRange: for a function macro, the beginning and end of an expansion range can come out of different macros/macro arguments, which means the resulting range is a complete mess to handle consistently. I also made some changes to how findCommonParent works; it works somewhat better in some cases, and somewhat worse in others, but I think overall it's a better balance. I'm coming to the conclusion that mapDiagnosticRanges isn't using the right algorithm, though: chasing the caret is fundamentally more complicated than any algorithm which only considers one FileID for the caret can handle because each SourceLocation doesn't really have a single parent. We need to follow the same path of choosing expansion locations and spelling locations which the caret used to come up with the correct range in the general case. Fixes <rdar://problem/12847524>. llvm-svn: 170049
* Extend stat query APIs to explicitly specify if the query is forArgyrios Kyrtzidis2012-12-111-2/+2
| | | | | | | | | | a file or directory, allowing just a stat call if a file descriptor is not needed. Doing just 'stat' is faster than 'open/fstat/close'. This has the effect of cutting down system time for validating the input files of a PCH. llvm-svn: 169831
* Escape % in the TextDiagnosticBuffer so they aren't interpreted twice when ↵Benjamin Kramer2012-12-081-3/+23
| | | | | | | | fed into the diagnostic formatting machinery again. Fixes PR14543. llvm-svn: 169677
* [driver, ms-inline asm] -fms-compatibility enables -fms-extensions, so this ↵Chad Rosier2012-12-051-1/+1
| | | | | | | | | should enable the AsmBlocks language extension as well. rdar://12808010 llvm-svn: 169448
* [driver, ms-inline asm] Have -fms-extensions enable the AsmBlocks languageChad Rosier2012-12-051-1/+1
| | | | | | | | option. MS-style inline asm can now be enabled by either -fasm-blocks or -fms-extensions. rdar://12808010 llvm-svn: 169445
* [driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier2012-12-051-0/+1
| | | | | | | -fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 llvm-svn: 169422
* PR14049: Don't say "expanded from macro 'foo'" when 'foo' just happens to beRichard Smith2012-12-051-2/+10
| | | | | | | the LHS of a token paste. Use "expanded from here" instead when we're not sure it's actually a macro. llvm-svn: 169373
* Minor reorganization. No functionality change.Richard Smith2012-12-051-30/+30
| | | | llvm-svn: 169367
* Simplify slightly by seperating out the responsibility for emission of a caretRichard Smith2012-12-051-34/+42
| | | | | | | | diagnostic from the emission of macro backtraces. Incidentally, we now get the displayed source location for a diagnostic and the location for the caret from the same place, rather than computing them separately. No functionality change. llvm-svn: 169357
* Simplify diagnostic emission. No functionality change intended.Richard Smith2012-12-051-20/+19
| | | | llvm-svn: 169351
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-0422-91/+89
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Refactor recording the preprocessor conditional directive regions out ofArgyrios Kyrtzidis2012-12-041-1/+1
| | | | | | | | | PreprocessingRecord and into its own class, PPConditionalDirectiveRecord. Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord without needing a PreprocessingRecord. llvm-svn: 169229
* Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this ↵Alexey Samsonov2012-12-031-0/+1
| | | | | | flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object. llvm-svn: 169144
* [ubsan] Add flag to enable recovery from checks when possible.Will Dietz2012-12-021-0/+1
| | | | llvm-svn: 169114
* Make helper classes anonymous. Make helper functions static instead of ↵Benjamin Kramer2012-12-011-155/+156
| | | | | | | | private members so the anonymous class doesn't leak out. No functionality change. llvm-svn: 169099
* Teach the serialized diagnostic writer to clone() itself, sharingDouglas Gregor2012-11-301-67/+112
| | | | | | | | | | state so that all of the various clones end up rendering their diagnostics into the same serialized-diagnostics file. This is important when we actually want failures during module build to be reported back to the translation unit that tried to import the not-yet-built or out-of-date module. <rdar://problem/12565727> llvm-svn: 169057
* Rename ModuleBuildPath -> ModuleBuildStack. Thanks, Dmitri!Douglas Gregor2012-11-302-16/+16
| | | | llvm-svn: 169045
* When we're emitting a diagnostic with a source location in an importedDouglas Gregor2012-11-302-8/+84
| | | | | | | | | | | | | | module, provide a module import stack similar to what we would get for an include stack, e.g., In module 'DependsOnModule' imported from build-fail-notes.m:4: In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1: Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here @interface Module <rdar://problem/12696425> llvm-svn: 169042
* When an error occurs while building a module on demand, provide "WhileDouglas Gregor2012-11-303-15/+68
| | | | | | | | | building module 'Foo' imported from..." notes (the same we we provide "In file included from..." notes) in the diagnostic, so that we know how this module got included in the first place. This is part of <rdar://problem/12696425>. llvm-svn: 169021
* Fix the computation of highlight ranges so we produce something sane whenEli Friedman2012-11-301-10/+30
| | | | | | | the beginning and end of the range are in different macro arguments. PR14399. llvm-svn: 168984
* Keep track of modules that have failed to build. If we encounter anDouglas Gregor2012-11-291-18/+55
| | | | | | | | | | | | import of that module elsewhere, don't try to build the module again: it won't work, and the experience is quite dreadful. We track this information somewhat globally, shared among all of the related CompilerInvocations used to build modules on-the-fly, so that a particular Clang instance will only try to build a given module once. Fixes <rdar://problem/12552849>. llvm-svn: 168961
* Reject uses of __int128 on platforms that don't support it. Also move the uglyRichard Smith2012-11-291-0/+2
| | | | | | | 'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be properly cleaned up. llvm-svn: 168856
* Remove some dead code. CLANG_IS_PRODUCTION is now just a build flag andRafael Espindola2012-11-271-1/+1
| | | | | | is not used in any #ifdef. llvm-svn: 168703
* Frontend: Create a virtual file for named pipe inputs.Daniel Dunbar2012-11-271-1/+5
| | | | | | - This ensures we see the right buffer size for the file. llvm-svn: 168636
* PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly2012-11-231-2/+0
| | | | llvm-svn: 168510
* Use color for -ast-dump-filter only when it is supportedDmitri Gribenko2012-11-211-3/+6
| | | | | | Patch by Philip Craig. llvm-svn: 168420
* Since CreateTargetInfo is taking ownership of the target options, passDouglas Gregor2012-11-163-8/+8
| | | | | | it as a pointer. llvm-svn: 168136
* [libclang] When caching code-completion results, pass the ↵Argyrios Kyrtzidis2012-11-161-4/+5
| | | | | | | | | | | | | | CachedCompletionAllocator to the CodeCompletionTUInfo that is going to be used to get the results. Previously we would use ASTUnit's CodeCompletionTUInfo which has its own allocator that will go away when we reparse. That could result in a use-after-free bug when getting the parent context name from a CodeCompletionString. Addresses rdar://12568377. llvm-svn: 168133
* CPP Output: Do not emit an enter file marker for the main file.Daniel Dunbar2012-11-161-0/+11
| | | | | | | | - This diverges from gcc, and confuses tools (like dtrace) which track # line markers as a way to determine which content is in the context of the main file. llvm-svn: 168128
* block extended signatur option. Change previous optionFariborz Jahanian2012-11-151-2/+2
| | | | | | | | to a cc1 -fencode-extended-block-signature and pass it to cc1 and recognize this option to produce extended block type signature. // rdar://12109031 llvm-svn: 168063
* [modules] Use a memory buffer directly as input for the module includes,Argyrios Kyrtzidis2012-11-151-13/+5
| | | | | | instead of messing with virtual files. llvm-svn: 168062
* [modules] Setup the import location of a module file and use itArgyrios Kyrtzidis2012-11-153-4/+5
| | | | | | as the include location of the main file of an imported module. llvm-svn: 168061
* Use empty parens for empty function parameter list instead of '(void)'.Dmitri Gribenko2012-11-151-2/+2
| | | | llvm-svn: 168041
* Make -ffp-contract a codegen option, rather than a laguage option. This makesLang Hames2012-11-151-12/+12
| | | | | | | more sense anyway - it determines how expressions are codegen'd. It also ensures that -ffp-contract=fast has the intended effect when compiling LLVM IR. llvm-svn: 168027
* Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode forRichard Smith2012-11-142-2/+3
| | | | | | | | | working with preprocessed testcases. This causes source locations in diagnostics to point at the spelling location instead of the presumed location, while still keeping the semantic effects of the line directives (entering and leaving system-header mode, primarily). llvm-svn: 168004
OpenPOWER on IntegriCloud