Summary:
This change turns SanitizerArgs into high-level options
stored in the Driver, which are parsed lazily. This fixes an issue of multiple copies of the same diagnostic message produced by sanitizer arguments parser.
Reviewers: rsmith
Reviewed By: rsmith
CC: chandlerc, eugenis, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1341
llvm-svn: 188660
Summary:
DeclRefExpr::getDecl gives us back a ValueDecl, this isa<> check will
never fire.
Reviewers: eli.friedman, doug.gregor, majnemer
Reviewed By: majnemer
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1434
llvm-svn: 188647
This reverts commit r188600.
r188640/r188639 fixed the root cause of the crash-on-valid that r188600
originally introduced. This now appears to bootstrap debug clang
successfully to the best of my testing.
llvm-svn: 188642
A partner to r188639, this is a somewhat heavy-handed fix to the general
issue, since even after that prior change the issue does still
unavoidably arise with template parameters (see test case).
There are other ways we could consider addressing this (see FIXME).
llvm-svn: 188640
Possible minor reduction in debug info & avoid some cases where creating
a context chain could lead to the type the context chain is being
created for, being created. (this is still possible with template
parameters - tests/fixes/improvements to follow)
llvm-svn: 188639
loop processing the candidates can cause new declerations to be added to
the context, invalidating lookup_result. To avoid that, make a copy of
the list of declarations to iterate over.
I don't have a way to check in a test case for this as it involves
a giant pile of source code and a generated PCH file used to accelerate
code completion, all of this running under ASan.
llvm-svn: 188623
Fixes a crash-on-valid introduced by r188486 (which should've occurred
earlier but for a blatant bug where calling createFwdDecl from the
requireCompleteType callback was useless under -flimit-debug-info and we
were just getting lucky with other later callbacks requiring the type
anyway).
llvm-svn: 188622
Per feedback from Chandler, it's better to have libraries with more specific functionality.
LibIndex will contain the indexing functionality of libclang, which includes USR generation.
llvm-svn: 188601
Updated test case to not rely on line numbers in more cases (it's hard
to use the @ check syntax for debug info test cases (due to the
interesting ordering of metadata) and this case in particular (given the
hash-line directive)) - left a few in there to cover the line number
information for these.
llvm-svn: 188585
Libclang has a lot of functionality that is inaccessible.
The purpose of clangIDE is to move most of the functionality of libclang to it so we
can expose it and have libclang be more of a thin C wrapper over clangIDE.
Start by moving the USR generation functionality into clangIDE.
llvm-svn: 188569
Summary:
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1402
llvm-svn: 188560
* Introduce operator< to replace Replacement::Less
* Make operator== and operator< on Replacements non-member functions
* Change order of comparisons in operator< to do string comparisons last
llvm-svn: 188550
Goals: Structure code better and make components easier to use for
future features (e.g. column layout for long braced initializers).
No functional changes intended.
llvm-svn: 188543
Summary:
HandleTopLevelDecl on a templated function leads us to try and mangle
it.
Reviewers: rsmith
Reviewed By: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1412
llvm-svn: 188536
We have a lot of fancy logic to find Visual Studio, which is currently used
to set the system header include paths.
Use the same code to set the ProgramPaths, which is used for finding programs
such as link.exe. Previously, Clang would just search PATH for link.exe,
but now it should find it if it's able to find Visual Studio.
Differential Revision: http://llvm-reviews.chandlerc.com/D1417
llvm-svn: 188531
This once again restores notes to following their associated warnings
in -analyzer-output=text mode. (This is still only intended for use as a
debugging aid.)
One twist is that the warning locations in "regular" analysis output modes
(plist, multi-file-plist, html, and plist-html) are reported at a different
location on the command line than in the output file, since the command
line has no path context. This commit makes -analyzer-output=text behave
like a normal output format, which means that the *command line output
will be different* in -analyzer-text mode. Again, since -analyzer-text is
a debugging aid and lo-fi stand-in for a regular output mode, this change
makes sense.
Along the way, remove a few pieces of stale code related to the path
diagnostic consumers.
llvm-svn: 188514
When we are parsing a type for an alias template, we are not entering
the context, so we can't look into dependent classes. Make sure the
parser handles this correctly.
PR16904.
llvm-svn: 188510
In addition to storing more useful information in the AST, this
fixes a semantic check in template instantiation which checks whether
the l-paren location is valid.
Fixes PR16903.
llvm-svn: 188495