Commit Graph

192 Commits

Author SHA1 Message Date
Dmitri Gribenko d394c8a83e AST Matchers: introduce functionTemplate(), classTemplate() and
isExplicitTemplateSpecialization() matchers which do what their name says.

llvm-svn: 162115
2012-08-17 18:42:47 +00:00
Richard Smith 034b94a557 Don't forget to apply #pragma pack to partial and explicit specializations of
class templates. This fixes misalignment issues in llvm/Support/Endian.h when
built by Clang.

llvm-svn: 162074
2012-08-17 03:20:55 +00:00
Sam Panzer d624bfb5f0 Matchers related to DeclStmt for matching the count of declarations, a particular declaration within the statement, and single-Decl DeclStmts.
llvm-svn: 162027
2012-08-16 17:20:59 +00:00
Sam Panzer 80c13773e3 Matchers which correspond to CastExpr, IgnoreImpCasts, IgnoreParenCasts, and IgnoreParenImpCasts
llvm-svn: 162025
2012-08-16 16:58:10 +00:00
Daniel Jasper faaffe373e Add ASTMatcher for matching extern "C" function declarations.
llvm-svn: 161974
2012-08-15 18:52:19 +00:00
Chad Rosier bf40d6b6a5 [ms-inline asm] Add various MC components to clang build to support MS-style inline assembly.
llvm-svn: 161594
2012-08-09 17:17:01 +00:00
Dmitri Gribenko ca7f80ada0 Comment parsing: extract TableGen'able pieces into new CommandTraits class.
llvm-svn: 161548
2012-08-09 00:03:17 +00:00
Chad Rosier 4577cd3036 Add various MC components to clang build to support MS-style inline assembly.
llvm-svn: 161498
2012-08-08 16:27:29 +00:00
Dmitri Gribenko 6297fa8a14 Comment parsing: fix crash on \tparam followed immediately by another block
command, for example: \tparam\brief.

llvm-svn: 161361
2012-08-06 23:48:44 +00:00
Dmitri Gribenko 6087ba7dc8 Comment parser tests: test that we allow placing no whitespace between \param
and [direction].

llvm-svn: 161146
2012-08-01 23:49:32 +00:00
Daniel Jasper 8bd14aab3a Add missing tests for class template specialization and template
argument matchers.

llvm-svn: 161102
2012-08-01 08:40:24 +00:00
Dmitri Gribenko 34df220410 Comment parsing: add support for \tparam command on all levels.
The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this
breaks libclang binary compatibility, but should not be a problem since API is
so new.

This also fixes PR13372 as a side-effect.

llvm-svn: 161087
2012-07-31 22:37:06 +00:00
Dmitri Gribenko dfe14f7848 Comment parser: add one more test
llvm-svn: 160965
2012-07-30 16:52:51 +00:00
Daniel Jasper 3cb72b476d Fix for ASTMatchFinder to visit a functions parameter declarations.
llvm-svn: 160947
2012-07-30 05:03:25 +00:00
Dmitri Gribenko 4586df765e Implement resolving of HTML character references (named: &, decimal: *,
hex: ) during comment parsing.

Now internal representation of plain text in comment AST does not contain
character references, but the characters themselves.

llvm-svn: 160891
2012-07-27 20:37:06 +00:00
Manuel Klimek e923569b1b Introduces the 'decl' matcher which was missing for a while
and became necessary with the change to require BindableMatchers
for binding.

Also fixes PR 13445: "hasSourceExpression only works for implicit casts".

llvm-svn: 160716
2012-07-25 10:02:02 +00:00
Dmitri Gribenko 35b0c09b6c Comment parsing: allow newlines between \param, direction specification (e.g.,
[in]), parameter name and description paragraph.

llvm-svn: 160682
2012-07-24 18:23:31 +00:00
Dmitri Gribenko 1c85d5b17d Comment parsing: retokenized text tokens are now pushed back in correct (not
reverse) order

llvm-svn: 160675
2012-07-24 16:10:47 +00:00
Manuel Klimek 86f8bbced4 Introduces a new concept for binding results to matchers
as per Chandler's request:
- introduces a new matcher base type BindableMatcher that
  provides the bind() call
- makes all dynamic-cast matcher creation functions return
  BindableMatchers; the special case about dynamic-cast
  matchers is that the node they match on and the node
  their child matchers match on are the same node, just
  casted to a different type; thus, there is no ambiguity
  on what bind() matches on; additionally, those are the
  matchers that we name with nouns in the matcher language,
  so it's easy for users to intuitively know which matchers
  are bindable

To make this change possible, we got rid of a non-orthogonal
implementation of thisPointerType, which had an implicit
dynamic-cast matcher from CallExpr to CXXMemberCallExpr; as
alternative, we now provide a memberCall dynamic-cast matcher
and thisPointerType is a predicate on CXXMemberCallExpr.

Last, the ArgumentAdaptingMatcher is actually not required
for the implementation of makeDynCastAllOfComposite - this
simplification makes it more obvious where the bind() call
can be used based on the matcher creation function types.

llvm-svn: 160673
2012-07-24 13:37:29 +00:00
Dmitri Gribenko 47f622d414 Comment parser unit tests: split a huge test case
llvm-svn: 160649
2012-07-23 23:37:11 +00:00
Dmitri Gribenko 89630bce27 Comment parser unit tests: reduce code duplication
llvm-svn: 160647
2012-07-23 23:09:32 +00:00
Dmitri Gribenko e3942ef9a4 add AST unittests to CMake build system
llvm-svn: 160640
2012-07-23 20:11:34 +00:00
Dmitri Gribenko 66a00c765f Fix PR13411: Comment parsing: failed assertion on unterminated verbatim block.
The assertion was wrong in case we have a verbatim block without a closing
command.

Also add tests for closing command name in a verbatim block, since now it can
be empty in such cases.

llvm-svn: 160568
2012-07-20 20:18:53 +00:00
Dmitri Gribenko e4a3997d70 Comment parsing: don't parse whitespace before \endverbatim as a separate line of whitespace.
llvm-svn: 160464
2012-07-18 23:01:58 +00:00
Daniel Jasper ef23e2053b Fix unit test dependency in Makefile and remove unneccessary dependency
again.

llvm-svn: 160358
2012-07-17 09:12:33 +00:00
Daniel Jasper 27c163b6ca Add missing dependency for unit test.
llvm-svn: 160356
2012-07-17 08:49:28 +00:00
Daniel Jasper 6389dd145d Finishing the move of RefactoringCallbacks and fixing the corresponding
buildbot failures.

llvm-svn: 160355
2012-07-17 08:37:03 +00:00
Daniel Jasper 1975e03494 Move RefactoringCallbacks to Tooling to avoid dependency from
ASTMatchers (lower level abstraction) to Tooling (higher level
abstraction).

llvm-svn: 160351
2012-07-17 08:03:01 +00:00
Daniel Jasper 2b3c7d414b Make the isDerivedFrom matcher more generic.
It now accepts an arbitrary inner matcher but is fully backwards
compatible.

llvm-svn: 160348
2012-07-17 07:39:27 +00:00
Daniel Jasper 7e22282b68 Add refactoring callbacks to make common kinds of refactorings easy.
llvm-svn: 160255
2012-07-16 09:18:17 +00:00
Daniel Jasper 84c763edbe Fix spelling of anyOf matcher and add missing test.
Patch by Sam Panzer!

llvm-svn: 160233
2012-07-15 19:57:12 +00:00
Dmitri Gribenko 619e75eb96 Comment AST nodes: rename getXXXCount() methods to getNumXXXs() to be in line with Statement AST nodes.
llvm-svn: 160182
2012-07-13 19:02:42 +00:00
Manuel Klimek 60b8016197 Allows retrieving all files in a CompilationDatabase.
Patch by Tobias Koenig, some test changes by myself.

llvm-svn: 160167
2012-07-13 12:31:45 +00:00
Dmitri Gribenko e00ffc7bb8 Comment parsing: repaint the bikesched: rename 'HTML open tags' to 'HTML start tags' and 'HTML close tags' to 'HTML end tags' according to HTML spec.
llvm-svn: 160153
2012-07-13 00:44:24 +00:00
Daniel Jasper 4e566c4aed This commit combines three patches to the ASTMatchers.
One adds matchers for the various parts of a for loop (initializer, condition,
increment), as well as extending the hasBody matcher to work for while and
do-while loops. The second patch adds an isInteger matcher for types.
The third patch fixes a bug in allOf, where a few of the name chages
(AllOf --> allOf) had been missed.

All matchers come with unit tests.

Patches by Sam Panzer!

llvm-svn: 160115
2012-07-12 08:50:38 +00:00
Dmitri Gribenko f26054f0fb Enable comment parsing and semantic analysis to emit diagnostics. A few
diagnostics implemented -- see testcases.

I created a new TableGen file for comment diagnostics,
DiagnosticCommentKinds.td, because comment diagnostics don't logically
fit into AST diagnostics file.  But I don't feel strongly about it.

This also implements support for self-closing HTML tags in comment
lexer and parser (for example, <br />).

In order to issue precise diagnostics CommentSema needs to know the
declaration the comment is attached to.  There is no easy way to find a decl by 
comment, so we match comments and decls in lockstep: after parsing one
declgroup we check if we have any new, not yet attached comments.  If we do --
then we do the usual comment-finding process.

It is interesting that this automatically handles trailing comments.
We pick up not only comments that precede the declaration, but also
comments that *follow* the declaration -- thanks to the lookahead in
the lexer: after parsing the declgroup we've consumed the semicolon
and looked ahead through comments.

Added -Wdocumentation-html flag for semantic HTML errors to allow the user to 
disable only HTML warnings (but not HTML parse errors, which we emit as
warnings in -Wdocumentation).

llvm-svn: 160078
2012-07-11 21:38:39 +00:00
Daniel Jasper 1dad183b38 Add more matchers and do cleanups.
Reviewers: klimek

    Differential Revision: http://ec2-50-18-127-156.us-west-1.compute.amazonaws.com/D2

llvm-svn: 160013
2012-07-10 20:20:19 +00:00
Benjamin Kramer 60d7f5a1d7 Disable death tests on platforms which don't support them.
llvm-svn: 160000
2012-07-10 17:30:44 +00:00
Manuel Klimek a9c86c980b Fixes the MSVC build.
llvm-svn: 159992
2012-07-10 14:21:30 +00:00
Dmitri Gribenko 17709ae8d9 Comment lexing: fix lexing to actually work in non-error cases.
llvm-svn: 159963
2012-07-09 21:32:40 +00:00
Manuel Klimek 2cf1ce7f1f Another fix for the configure build: correct order of dependencies.
llvm-svn: 159809
2012-07-06 08:13:45 +00:00
Manuel Klimek cb93f785de Build-fix: Remove non-existent directories from Makefiles.
llvm-svn: 159807
2012-07-06 06:00:30 +00:00
Manuel Klimek 04616e4776 Adds the AST Matcher library, which provides a in-C++ DSL to express
matches on interesting parts of the AST, and callback mechanisms to
act on them.

llvm-svn: 159805
2012-07-06 05:48:52 +00:00
Dmitri Gribenko ec92531c29 Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.

Comments AST is modelled along the ideas of HTML AST: block and inline content.

* Block content is a paragraph or a command that has a paragraph as an argument
  or verbatim command.
* Inline content is placed within some block.  Inline content includes plain
  text, inline commands and HTML as tag soup.

llvm-svn: 159790
2012-07-06 00:28:32 +00:00
Manuel Klimek 5da9dcb275 Adapts the FrontendAction convenience functions so that it can be
used with classes that generate ASTConsumers; this allows decoupling
the ASTConsumer generation from the Frontend library (like, for example,
the MatchFinder in the upcoming ASTMatcher patch).

llvm-svn: 159760
2012-07-05 18:13:01 +00:00
Benjamin Kramer eb7b9f8248 Update unittests for include change.
llvm-svn: 159724
2012-07-04 20:33:53 +00:00
Dmitri Gribenko 632d58afab Fix an infinite loop in comment lexer: we were not advancing in the input character stream when we saw a '<' that is not a start of an HTML tag.
llvm-svn: 159303
2012-06-27 23:28:29 +00:00
Dmitri Gribenko 1669f70273 Remove unsigned and a pointer from a comment token (so that each token can have only one semantic string value attached to it), at a cost of adding an additional token.
llvm-svn: 159270
2012-06-27 16:53:58 +00:00
Dmitri Gribenko 5188c4b9cc Implement a lexer for structured comments.
llvm-svn: 159223
2012-06-26 20:39:18 +00:00
Matt Beaumont-Gay a0e2c04c24 Appease -Wnon-virtual-dtor and fix a typo in a comment
llvm-svn: 159151
2012-06-25 18:27:11 +00:00
Richard Smith 87d8fb91e9 Add testing for CommentHandler, and fix a bug where trailing comments in #else
and #endif in non-skipped blocks were not passed to the CommentHandler. Patch
by Andy Gibbs!

llvm-svn: 159119
2012-06-24 23:56:26 +00:00
Chandler Carruth 016bbd88cf Clang side of a refactoring of the CMake unit test build strategy.
The fundamental change is to put a CMakeLists.txt file in the unittest
directory, with a single test binary produced from it. This has several
advantages.

Among other fundamental advantages, we start to get the checking logic
for when a file is missing from the CMake build, and this caught one
missing file already! More fun details in the LLVM commit corresponding
to this one.

Note that the LLVM commit and this one most both be applied, or neither.
Sorry for any skew issues.

llvm-svn: 158910
2012-06-21 09:51:42 +00:00
Daniel Jasper c4dabab941 Make the RecursiveASTVisitor visit the body of a range-based for loop
again. This was broken in r158395.

llvm-svn: 158907
2012-06-21 08:50:04 +00:00
Chandler Carruth f0dcac6800 Switch Clang to re-use the the newly factored common LLVM
implementation. Yay for '-' lines in CMake!

llvm-svn: 158897
2012-06-21 05:23:23 +00:00
Chandler Carruth 8897331381 Simplify the Clang unittest function in the CMake build, and make it
match the LLVM implemenation. This also simplifies the name management
and splits the custom library management out from the unittest specific
management. It finally drops the dependency on parsing cmake arguments.

llvm-svn: 158894
2012-06-21 02:04:39 +00:00
Chandler Carruth 28969b4139 Remove a goofy CMake hack and use the standard CMake facilities to
express library-level dependencies within Clang.

This is no more verbose really, and plays nicer with the rest of the
CMake facilities. It should also have no change in functionality.

llvm-svn: 158888
2012-06-21 01:30:21 +00:00
Chandler Carruth 4b3d2c801c Remove an unused feature of the clang unittest macro.
llvm-svn: 158884
2012-06-21 00:40:48 +00:00
Chandler Carruth 39a3e7544a Fix a big layering violation introduced by r158771.
That commit added a new library just to hold the RawCommentList. I've
started a discussion on the commit thread about whether that is really
meritted -- it certainly doesn't seem necessary at this stage.

However, the immediate problem is that the AST library has a hard
dependency on the Comment library, but the dependencies were set up
completely backward. In addition to the layering violation, this had an
unfortunate effect if scattering the Comments library dependency
throughout the build system, but inconsistently so -- several parts of
the CMake dependencies were missing and only showed up due to transitive
deps or the fact that the target wasn't being built by tho bots.

It turns out that the Comments library can't (currently) be a well
formed layer *below* the AST library either, as it has an API that
accepts an ASTContext. That parameter is currently unused, so maybe that
was a mistake?

Anyways, it really seems like this is logically part of the AST --
that's the whole point of the ASTContext providing access to it as far
as I can tell -- so I've merged it into the AST library to solve the
immediate layering violation problems and remove some of the churn from
our library dependencies.

llvm-svn: 158807
2012-06-20 09:53:52 +00:00
Dmitri Gribenko aab8383a2b Structured comment parsing, first step.
* Retain comments in the AST
* Serialize/deserialize comments
* Find comments attached to a certain Decl
* Expose raw comment text and SourceRange via libclang

llvm-svn: 158771
2012-06-20 00:34:58 +00:00
Jordan Rose 8d63d5b8e6 Fix the location of the fixit for -Wnewline-eof.
It turns out SourceManager treating the "one-past-the-end" location as invalid,
but then failing to set the invalid flag properly.

llvm-svn: 158699
2012-06-19 03:09:38 +00:00
NAKAMURA Takumi fdf9d7197b ToolingTest.cpp: Fix r158592, runToolOnCode.FindsNoTopLevelDeclOnEmptyCode on msvc. LangOpts.MicrosoftExt still appends "class type_info;".
llvm-svn: 158595
2012-06-16 06:04:05 +00:00
Meador Inge 5d3fb22bac Explicitly build __builtin_va_list.
The target specific __builtin_va_list types are now explicitly built instead
of injecting strings into the preprocessor input.

llvm-svn: 158592
2012-06-16 03:34:49 +00:00
Daniel Jasper 4e525e216d Rename shouldVisitImplicitDeclarations to shouldVisitImplicitCode.
Fix RecursiveASTVisitor to visit CXXForRangeStmts accordingly to visit
implicit or explicit code.

The key bug that inspired this was the Visitor not visiting the range
initializer of such a loop, which is explicit code.

llvm-svn: 158395
2012-06-13 07:12:33 +00:00
Benjamin Kramer b696a3639d Move sideeffecting call out of assert().
llvm-svn: 158146
2012-06-07 09:57:21 +00:00
Manuel Klimek 0a8b9cd1e7 Switches the RewriterTestContext away from PathV1.
Now the ToolingTests all work on Windows, and they also clean up their temporary directory if they don't crash.

llvm-svn: 158112
2012-06-06 21:28:13 +00:00
Manuel Klimek ee56b541d8 Fixes the refactoring library test in VS2010.
llvm-svn: 158019
2012-06-05 20:16:30 +00:00
Richard Smith b34dc87826 RecursiveASTVisitor: add ability to visit implicit declarations. Patch by
James Dennett!

llvm-svn: 158002
2012-06-05 16:18:26 +00:00
NAKAMURA Takumi 5c76f83106 Revert r157819, "#ifdef out a broken test on win32"
FYI, LLVM_ON_WIN32 is useless.

llvm-svn: 157890
2012-06-02 15:34:26 +00:00
Alexander Kornienko 685f43ff02 #ifdef out a broken test on win32
llvm-svn: 157819
2012-06-01 16:48:55 +00:00
Alexander Kornienko 55f2ca9b27 Added a test for ToolInvocation::mapVirtualFile method.
llvm-svn: 157812
2012-06-01 14:50:43 +00:00
Richard Smith ee48633937 Only visit default arguments for template declarations when visiting the template declaration which introduced them. Patch by Yang Chen!
llvm-svn: 157723
2012-05-30 23:55:51 +00:00
Daniel Jasper 41acbc62fb Test commit - Fix typo in comment.
llvm-svn: 157674
2012-05-30 04:30:08 +00:00
NAKAMURA Takumi 42e5ac409c clang/unittests/Tooling/RewriterTestContext.h: Don't try to remove TemporaryDirectory.
llvm-svn: 157530
2012-05-27 13:10:14 +00:00
Manuel Klimek 3f00134c05 Adds the Refactoring library, which is a layer on top of the Tooling library
that allows easy refactoring across translation units.

llvm-svn: 157331
2012-05-23 16:29:20 +00:00
Manuel Klimek d9c79e753b Fixes the autoconf build.
llvm-svn: 157266
2012-05-22 17:45:33 +00:00
Manuel Klimek 78d084d942 Adds a method overwriteChangedFiles to the Rewriter. This is implemented by
first writing the changed files to a temporary location and then overwriting
the original files atomically.

Also adds a RewriterTestContext to aid unit testing rewrting logic in general.

llvm-svn: 157260
2012-05-22 17:01:35 +00:00
Manuel Klimek fdbe4f9dc2 Fixes crasher bug in JSONCompilationDatabase for invalid input.
llvm-svn: 156814
2012-05-15 11:46:07 +00:00
Richard Smith 6dd62fd99d RecursiveASTVisitor:
We don't create any declaration to mark the explicit instantiation of function
templates other than the instantiation itself, so visit that when traversing
the function template decl.

This is a temporary fix, pending the creation of a Decl node to represent the
explicit instantiation.

Patch by Daniel Jasper!

llvm-svn: 156522
2012-05-09 23:51:36 +00:00
Richard Smith 7cbeaba05c Unrevert r155951, reverted in r155962, with two changes:
* Work around build failures due to gcc 4.2 bugs.
 * Remove BodyIndexer::TraverseCXXOperatorCallExpr, which was not being called
   prior to this change, and whose presence disables a RecursiveASTVisitor
   stack space optimization after this change.

llvm-svn: 155969
2012-05-02 00:30:48 +00:00
Andrew Trick 72445ca0bb Revert "Fix RecursiveASTVisitor's data recursion to call the Traverse* functions if they"
FAIL: Clang :: Index/index-many-call-ops.cpp
llvm-svn: 155962
2012-05-01 23:47:36 +00:00
Richard Smith 05ec18c3a1 Fix RecursiveASTVisitor's data recursion to call the Traverse* functions if they
have been overridden in the derived class. Also, remove a non-functional
implementation of an incorrect optimization for ParenExprs.

llvm-svn: 155951
2012-05-01 21:58:31 +00:00
David Blaikie ea7d847290 Fix file name in comment.
Patch by Yang Chen.

llvm-svn: 155658
2012-04-26 20:39:46 +00:00
Richard Smith f333acd686 RecursiveASTVisitor: When in 'shouldVisitTemplateInstantiations' mode, visit
all instantiations of a template when we visit the canonical declaration of the
primary template, rather than trying to match them up to the partial
specialization from which they are instantiated. This fixes a bug where we
failed to visit instantiations of partial specializations of member templates of
class templates, and naturally extends to allow us to visit instantiations where
we have instantiated only a declaration.

llvm-svn: 155597
2012-04-25 22:57:25 +00:00
Richard Smith 7af41ccdc4 RecursiveASTVisitor: Visit instantiations of member templates of class
templates. In an implicit instantiation of a member class, any member
templates don't get instantiated, so the existing check which only visited
the instantiations of a defined template skipped these templates'
instantiations.

Since there is only a single declaration of a member template of a class
template specialization, just use that to determine whether to visit the
instantiations. This introduces a slight inconsistency in that we will
visit the instantiations of such templates whether or not they are
defined, but we never visit a declared-but-not-defined instantiation, so
this turns out to not matter.

Patch by Daniel Jasper!

llvm-svn: 155487
2012-04-24 20:39:49 +00:00
Manuel Klimek 969186fa4b Fix PR12608. Patch contributed by Yang Chen.
llvm-svn: 155355
2012-04-23 16:40:40 +00:00
Manuel Klimek 21a7a5e8cf No need to put the SourceManager in with the ASTContext, as the ASTContext
already contains the SourceManager.

llvm-svn: 155198
2012-04-20 14:07:01 +00:00
Manuel Klimek 770691b153 Adds a unit test for the RecursiveASTVisitor.
llvm-svn: 155108
2012-04-19 08:48:53 +00:00
Manuel Klimek ff26efceb4 Adds a FixedCompilationDatabase to be able to specify tool parameters
at the command line.

llvm-svn: 154989
2012-04-18 07:41:50 +00:00
Douglas Gregor 1840cc2cc6 Kill the last vestiges of clangIndex
llvm-svn: 154675
2012-04-13 17:26:32 +00:00
Benjamin Kramer 74875e6719 clangFrontend depends on clangEdit.
llvm-svn: 154010
2012-04-04 12:25:11 +00:00
Manuel Klimek 47c245a537 Adds a tooling library.
Provides an API to run clang tools (FrontendActions) as standalone tools,
or repeatedly in-memory in a process. This is useful for unit-testing,
map-reduce style applications, source transformation daemons or command line
tools.

The ability to run over multiple translation units with different command
line arguments enables building up refactoring tools that need to apply
transformations across translation unit boundaries.

See tools/clang-check/ClangCheck.cpp for an example.

llvm-svn: 154008
2012-04-04 12:07:46 +00:00
Argyrios Kyrtzidis a956450eb7 [preprocessor] Handle correctly inclusion directives that have macro expansions, e.g
"#include MACRO(STUFF)".

-As an inclusion position for the included file, use the file location of the file where it
was included but *after* the macro expansions. We want the macro expansions to be considered
as before-in-translation-unit for everything in the included file.

-In the preprocessing record take into account that only inclusion directives can be encountered
as "out-of-order" (by comparing the start of the range which for inclusions is the hash location)
and use binary search if there is an extreme number of macro expansions in the include directive.

Fixes rdar://11111779

llvm-svn: 153527
2012-03-27 18:47:48 +00:00
Fariborz Jahanian 461b7bb9e6 get rid of an unsued variable warning.
llvm-svn: 152146
2012-03-06 21:18:56 +00:00
Ted Kremenek f7639e1b4a Add new code migrator support for migrating existing Objective-C code to use
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax.

This introduces a new library, libEdit, which provides a new way to support
migration of code that improves on the original ARC migrator.  We now believe
that most of its functionality can be refactored into the existing libraries,
and thus this new library may shortly disappear.

llvm-svn: 152141
2012-03-06 20:06:33 +00:00
Argyrios Kyrtzidis 647dcd80f0 [preprocessor] Enhance PreprocessingRecord to keep track of locations of conditional directives.
Introduce PreprocessingRecord::rangeIntersectsConditionalDirective() which returns
true if a given range intersects with a conditional directive block.

llvm-svn: 152018
2012-03-05 05:48:17 +00:00
Dylan Noblesmith c95d81924d Basic: import IntrusiveRefCntPtr<> into clang namespace
The class name is long enough without the llvm:: added.
Also bring in RefCountedBase and RefCountedBaseVPTR.

llvm-svn: 150958
2012-02-20 14:00:23 +00:00
Dylan Noblesmith f1a13f29f2 drop more llvm:: prefixes on SmallString<>
More cleanup after r149799.

llvm-svn: 150380
2012-02-13 12:32:26 +00:00
Benjamin Kramer 4903802fbf Move a method from IdentifierTable.h out of line and remove the SmallString include.
Fix all the transitive include users.

llvm-svn: 149783
2012-02-04 13:45:25 +00:00
Argyrios Kyrtzidis 0d9e24b1db Change Lexer::makeFileCharRange() to have it accept a CharSourceRange
instead of a SourceRange, and handle the case where the range is
a char (not token) range.

llvm-svn: 149677
2012-02-03 05:58:29 +00:00
Douglas Gregor 8992928274 Thread a TargetInfo through to the module map; we'll need it for
target-specific module requirements.

llvm-svn: 149224
2012-01-30 06:01:29 +00:00