summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Replace vectors with arrays.Benjamin Kramer2011-10-153-69/+73
| | | | llvm-svn: 142072
* Neither 'Warning' nor 'NonNote' was a good name for this location...Chandler Carruth2011-10-151-13/+14
| | | | | | | It's the last include-stack-root we tried to walk up. Use a better name and better doxyments for it. llvm-svn: 142071
* Nuke a bunch of FIXMEs that are now fixed. =] Also, remove the now-deadChandler Carruth2011-10-151-8/+3
| | | | | | | | | TextDiagnosticPrinter argument to the TextDiagnostic helper class. This cements the proper ordering of things: TextDiagnostic is now a viable stand-alone class for emitting pretty-printed textual diagnostics to a terminal. llvm-svn: 142070
* Sink the include stack printing into the generic text diagnosticChandler Carruth2011-10-151-52/+50
| | | | | | | | | | | | | | | utility. This is a particularly nice win because it removes a pile of parameters from these routines. Also name them a bit better. I'm trying to follow the pattern of 'emit' routines writing directly to what is expected to be the final output, while 'print' routines take a output stream argument and can be used to build up intermediate buffers, etc. Also, fix a bug I spotted by inspection from my last commit where 'LastLoc' and 'LastNonNoteLoc' were reversed. It's really scary that this didn't trigger a single test failure. Will be working on tests for more of this functionality now. llvm-svn: 142069
* Rationalize some of how the locations of prior diagnostics are trackedChandler Carruth2011-10-151-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | across emissions. 1) The include stack printing is conditioned on non-note diagnostics, not just on warning diagnostics. 2) Those should be full source locations as they're tied to a source manager. 3) We should pass in the prior state to the TextDiagnostic constructor, allow it to mutate as diagnostics are emitted, and then cache the final state before tearing it down. Some of this remains incomplete, specifically #3 isn't finished for the non-note location. That'll come when the include stack printing sinks down a level. This also highlights how *completely* bug-ridden this code is. For example, we currently do all these comparisons of a FullSourceLoc and a SourceLocation... which silently does a SourceLocation to SourceLocation comparison, completely disregarding the source manager from whence one of the arguments came. Oops! Good thing in practice this wasn't important, but it could in theory be suppressing caret diagnostics in a second TU on a single clang invocation. I'm hoping to hammer these bugs out as the refactorings occur, although for so many of them it's really unlikely I can dream up a test case that would show the potentially buggy behavior. llvm-svn: 142067
* Sink the EmitDiagnosticLoc method down to the generic TextDiagnosticChandler Carruth2011-10-151-110/+108
| | | | | | interface now that its only caller is there. llvm-svn: 142065
* Sink the non-caret diagnostic logic down and out of the diagnosticChandler Carruth2011-10-151-270/+276
| | | | | | | | | | | | | consumer. The TextDiagnostic interface now has a generic entry point for emitting a diagnostic which uses a minimal interface that should be compatible with StoredDiagnostics such as are available in libclang etc. Some unfortunate shuffling of static functions as things get relocated. Also some unfortunate public interface points added to TextDiagnosticPrinter, but those are the next bits to get moved so they won't last long. llvm-svn: 142064
* Simplify the interface of a helper method in the TextDiagnosticPrinterChandler Carruth2011-10-151-17/+18
| | | | | | | | | | | to operate directly on the source location and ranges associated with a diagnostic rather than digging them out of the diagnostic. This had a side benefit of cleaning up its code a tiny bit by using the ArrayRef interface. No functionality changed. llvm-svn: 142063
* Add -Wc++98-compat warning for deduced 'auto' type specifier.Richard Smith2011-10-151-1/+3
| | | | llvm-svn: 142057
* Implement -Wc++98-compat warnings for the parser.Richard Smith2011-10-158-49/+85
| | | | llvm-svn: 142056
* Refactor: remove redundant check for 'final' specifier when parsing ↵Richard Smith2011-10-151-13/+4
| | | | | | class/struct definition. llvm-svn: 142054
* Rename an ExtWarn to ext_ for consistency.Richard Smith2011-10-151-1/+1
| | | | llvm-svn: 142049
* Don't warn about use of 'final' in ill-formed C++98 code which didn't useRichard Smith2011-10-152-4/+5
| | | | | | | 'final', and don't accept (then silently discard) braced init lists in C++98 new-expressions. llvm-svn: 142048
* Handle an edge case involving the conditional operator and throw ↵Eli Friedman2011-10-151-5/+12
| | | | | | expressions. PR10582. llvm-svn: 142047
* Change 'Emit' to 'EmitCaret' which sums up what it *should* be doing.Chandler Carruth2011-10-151-6/+9
| | | | | | | | Also note that it is actually doing much more than it should. This paves the way for building a more generic 'Emit' routine that is the real entry point here. llvm-svn: 142035
* -Wc++98-compat warnings for the lexer.Richard Smith2011-10-154-8/+28
| | | | | | | | This also adds a -Wc++98-compat-pedantic for warning on constructs which would be diagnosed by -std=c++98 -pedantic (that is, it warns even on C++11 features which we enable by default, with no warning, in C++98 mode). llvm-svn: 142034
* Teach the ASTImporter to perform DeclContext lookups in a way thatDouglas Gregor2011-10-152-77/+109
| | | | | | | | | | avoids loading data from an external source, since those lookups were causing some "interesting" recursion in LLDB. This code is not efficient. I plan to remedy this inefficiency in a follow-up commit. llvm-svn: 142023
* Add c_alignas and cxx_alignas featuresPeter Collingbourne2011-10-141-0/+3
| | | | llvm-svn: 142020
* Provide half floating point support as a storage only type.Anton Korobeynikov2011-10-1426-40/+195
| | | | | | Lack of half FP was a regression compared to llvm-gcc. llvm-svn: 142016
* Attempt to fix Windows buildbot, round 2.Eli Friedman2011-10-141-1/+1
| | | | llvm-svn: 142014
* Add template instantiation support for AtomicExpr.Eli Friedman2011-10-143-25/+70
| | | | llvm-svn: 142012
* Teach the ASTImporter not to import redundant fields.Douglas Gregor2011-10-141-50/+101
| | | | llvm-svn: 142009
* Attempt to fix buildbot failure on Windows.Eli Friedman2011-10-141-1/+2
| | | | llvm-svn: 142008
* Allow calling ASTUnit::LoadFromCompilerInvocationAction with a previously ↵Argyrios Kyrtzidis2011-10-141-13/+16
| | | | | | created ASTUnit. llvm-svn: 142004
* Misc fixes for atomics. Biggest fix is doing alignment correctly for ↵Eli Friedman2011-10-145-11/+41
| | | | | | _Atomic types. llvm-svn: 142002
* -Wc++98-compat: warn on C++11 attributes and alignas.Richard Smith2011-10-141-0/+3
| | | | llvm-svn: 141999
* Don't try to diagnose anything when we're passing incomplete typesDouglas Gregor2011-10-141-1/+4
| | | | | | | | through varargs. This only happens when we're in an unevaluated context, where we don't want to trigger an error anyway. Fixes PR11131 / <rdar://problem/10288375>. llvm-svn: 141986
* Reinstate r141898 (reverted in r141921), without the ↵Richard Smith2011-10-142-6/+13
| | | | | | | | -Wc++98-compat-variadic-templates flag. Consensus is that -Wc++98-compat is a useful addition to clang, but per-C++11-feature warnings may not be. Original patch by Jeffrey Yasskin. llvm-svn: 141985
* Refactor static analyzer to use simpler interface to constant expression ↵Richard Smith2011-10-142-42/+17
| | | | | | evaluation. llvm-svn: 141983
* [temp.explicit]p1: constexpr cannot be specified in explicit instantiations.Richard Smith2011-10-141-3/+6
| | | | llvm-svn: 141982
* Fix the CXX_INCLUDE_ROOT case that was out of date with ScanLibDirForGCCTriple.Rafael Espindola2011-10-141-1/+1
| | | | llvm-svn: 141980
* Change operator<< for raw_ostream and NamedDecl to take a reference instead ↵Benjamin Kramer2011-10-1428-114/+112
| | | | | | | | of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. llvm-svn: 141971
* Simplify code to avoid a useless string copy.Benjamin Kramer2011-10-141-6/+4
| | | | llvm-svn: 141970
* Upgrade to PathV2.Benjamin Kramer2011-10-141-5/+5
| | | | llvm-svn: 141969
* Add parens to pacify GCC.Benjamin Kramer2011-10-141-2/+2
| | | | llvm-svn: 141968
* Fix misplaced comment.Fariborz Jahanian2011-10-141-3/+3
| | | | llvm-svn: 141967
* Make value kind based on the return type of the getter, notFariborz Jahanian2011-10-141-4/+4
| | | | | | | property type, for when getter may be a reference type. // rdar://10188258 revised. llvm-svn: 141966
* [PCH] Serialize info about redeclared objc methods.Argyrios Kyrtzidis2011-10-143-2/+19
| | | | llvm-svn: 141964
* Under ARC, merge the bit corresponding to the ns_returns_retainedDouglas Gregor2011-10-141-0/+12
| | | | | | | attribute from the first declaration to later declarations. Fixes <rdar://problem/10142572>. llvm-svn: 141957
* Only warn in -Wliteral-conversion if the conversion loses informationMatt Beaumont-Gay2011-10-141-19/+7
| | | | llvm-svn: 141955
* When declaring an out-of-line template, attempt to rebuild any typesDouglas Gregor2011-10-142-0/+58
| | | | | | | within the template parameter list that may have changed now that we know the current instantiation. Fixes <rdar://problem/10194295>. llvm-svn: 141954
* Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations toErik Verbruggen2011-10-142-4/+34
| | | | | | retrieve annotations from completion string. llvm-svn: 141953
* Really protect from infinite loop when there are objc method redeclarations.Argyrios Kyrtzidis2011-10-142-2/+14
| | | | | | Serialization part will come later. llvm-svn: 141950
* Keep track of objc method redeclarations in the same interface.Argyrios Kyrtzidis2011-10-142-1/+9
| | | | | | Avoid possible infinite loop when iterating over an ObjCMethod's redeclarations. llvm-svn: 141946
* Use Triple.isOSDarwin() instead of comparing against Triple::Darwin.Bob Wilson2011-10-144-17/+19
| | | | | | | | | There are now separate Triple::MacOSX and Triple::IOS values for the OS so comparing against Triple::Darwin will fail to match those. Note that I changed the expected output for the Driver/rewrite-objc.m test, which had previously not been passing Darwin-specific options with the macosx triple. llvm-svn: 141944
* PR11124: Don't overwrite memory outside of a base class when performing ↵Eli Friedman2011-10-143-2/+66
| | | | | | zero-initialization before running its constructor. llvm-svn: 141933
* Add a preprocessor callback that is invoked every time the 'defined'Douglas Gregor2011-10-141-0/+4
| | | | | | operator is seen, from Jason Haslam! llvm-svn: 141926
* Revert the -Wc++98-compat flag because dgregor doesn't like it.Jeffrey Yasskin2011-10-142-13/+6
| | | | llvm-svn: 141921
* objc-arc: 'Class' property is implicitly __unsafe_unretained.Fariborz Jahanian2011-10-131-1/+1
| | | | | | // rdar://10239594 llvm-svn: 141915
* Rename -Wc++0x-compat, -Wc++0x-extensions and -Wc++0x-narrowing from c++0x toRichard Smith2011-10-131-1/+3
| | | | | | | c++11. The old names are kept for backwards-compatibility. Patch by Ahmed Charles! Names for backwards-compatible DiagGroups removed by me. llvm-svn: 141913
OpenPOWER on IntegriCloud