Commit Graph

1741 Commits

Author SHA1 Message Date
Douglas Gregor 998caead70 Introduce a new libclang parsing flag,
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
2011-05-06 16:33:08 +00:00
Richard Smith 3f1b5d077b Implement support for C++0x alias templates.
llvm-svn: 130953
2011-05-05 21:57:07 +00:00
Douglas Gregor af44c781a7 When the environment variable LIBCLANG_RESOURCE_USAGE is set, teach
libclang to emit information about resource usage after parsing, code
completion, etc.

llvm-svn: 130946
2011-05-05 20:27:22 +00:00
Ted Kremenek 2160a0d3d7 Enhance clang_getCXTUResourceUsage() to return the amount of memory used by the Preprocessor's bump allocator as well as those from the PreprocessingRecord.
llvm-svn: 130823
2011-05-04 01:38:46 +00:00
Douglas Gregor 37aa4938c8 Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(),
which determines whether a particular file is actually a header that
is intended to be guarded from multiple inclusions within the same
translation unit.

llvm-svn: 130808
2011-05-04 00:14:37 +00:00
Ted Kremenek 9c10d0a3ce Use the canonical decl when generating the locations for USRs.
llvm-svn: 130748
2011-05-03 01:33:35 +00:00
Chandler Carruth 73aa8f7027 Based on the new information in the AST provided by r130628, write
3 lines of code and improve a bunch of information in the libclang view
of the code.

Updates the two tests that exercise this with the new data, checking
that each new source location actually points back to the declared
template parameter.

llvm-svn: 130656
2011-05-01 09:53:37 +00:00
Rafael Espindola 26cdfa71ef Update API.
llvm-svn: 130588
2011-04-30 03:46:18 +00:00
Ted Kremenek 491da68ef9 Guard in USRGenerator::GenLoc() against null Decl* from invalid code.
llvm-svn: 130541
2011-04-29 21:35:23 +00:00
Ted Kremenek 5e1ed7b8dd Enhance clang_getCXTUResourceUsage() to report the sizes of the memory buffers used by PCH.
llvm-svn: 130460
2011-04-28 23:46:20 +00:00
Ted Kremenek 8d58790019 Enhance clang_getCXTUResourceUsage() to report how much memory is used by SourceManager's memory buffers.
llvm-svn: 130433
2011-04-28 20:36:42 +00:00
Ted Kremenek f5df0ce949 Enhance clang_getCXTUResourceUsage() to report the amount of memory used by ASTContext's side tables.
llvm-svn: 130383
2011-04-28 04:53:38 +00:00
Ted Kremenek 21735e608d Enhance clang_getCXTUResourceUsage() to report the amount of memory used by SourceManager's content cache allocator.
llvm-svn: 130380
2011-04-28 04:10:31 +00:00
John Wiegley 1c0675e155 Parsing/AST support for Structured Exception Handling
Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

llvm-svn: 130366
2011-04-28 01:08:34 +00:00
John Wiegley 6242b6a688 Implementation of Embarcadero array type traits
Patch authored by John Wiegley.

These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).

llvm-svn: 130351
2011-04-28 00:16:57 +00:00
Ted Kremenek 04f93b9cf1 Update regex in scan-build for parsing statistics.
llvm-svn: 130347
2011-04-27 23:43:27 +00:00
Ted Kremenek f26109664e Update scan-build to '-analyzer-checker debug.Stats' instead of the old '-analyzer-stats' -cc1 argument.
llvm-svn: 130320
2011-04-27 18:53:08 +00:00
John McCall 0009fcc39e Make yet another placeholder type, this one marking that an expression is a bound
member function, i.e. something of the form 'x.f' where 'f' is a non-static
member function.  Diagnose this in the general case.  Some of the new diagnostics
are probably worse than the old ones, but we now get this right much more
universally, and there's certainly room for improvement in the diagnostics.

llvm-svn: 130239
2011-04-26 20:42:42 +00:00
John Wiegley f9f6584e95 t/clang/expr-traits
Patch authored by David Abrahams.

These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.

llvm-svn: 130122
2011-04-25 06:54:41 +00:00
Douglas Gregor 0ff2b2eda3 Teach libclang to be more careful around BlockDecls, and don't assume
that a TypeSourceInfo is always available, like we do everywhere else
in libclang. Fixes <rdar://problem/9311140>.

llvm-svn: 130034
2011-04-22 23:49:24 +00:00
Francois Pichet 1c229c0472 Add -fdelayed-template-parsing option. Using this option all templated 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
2011-04-22 22:18:13 +00:00
Nick Lewycky 207bce31e1 Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (at
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
2011-04-21 23:44:07 +00:00
Douglas Gregor 07542c5b2d When translating a Clang source range into a libclang source range,
adjust the a ending macro location to the end of the instantiation
location before adjusting it to the end of the token. Fixes
<rdar://problem/9021561>.

llvm-svn: 129872
2011-04-20 21:16:21 +00:00
Ted Kremenek 23324124e4 Rename 'CXTUMemoryUsage…' to 'CXTUResourceUsage…'.
llvm-svn: 129857
2011-04-20 16:41:07 +00:00
Douglas Gregor 49f754f423 Teach SourceManager::getSLocEntry() that it can fail due to problems
during deserialization from  a precompiled header, and update all of
its callers to note when this problem occurs and recover (more)
gracefully. Fixes <rdar://problem/9119249>.

llvm-svn: 129839
2011-04-20 00:21:03 +00:00
Ted Kremenek fd07f85605 Add missing break statements.
llvm-svn: 129750
2011-04-19 04:36:17 +00:00
Ted Kremenek 11d1a42e84 Report memory usage for global code completion results in CXTUMemoryUsage.
llvm-svn: 129733
2011-04-18 23:42:53 +00:00
Francois Pichet 45cc546271 Unbreak the MSVC build: Don't mix variable declarations and statements in a .c file.
llvm-svn: 129732
2011-04-18 23:33:22 +00:00
Ted Kremenek 83f642e54a Add libclang API to query how much memory is used by a CXTranslationUnit. This is a WIP. Currently we report
the amount used for expressions, types, identifiers, and selectors.

llvm-svn: 129730
2011-04-18 22:47:10 +00:00
Richard Smith dda56e4b4a Support for C++11 (non-template) alias declarations.
llvm-svn: 129567
2011-04-15 14:24:37 +00:00
Peter Collingbourne 9114759641 C1X: implement generic selections
As an extension, generic selection support has been added for all
supported languages.  The syntax is the same as for C1X.

llvm-svn: 129554
2011-04-15 00:35:48 +00:00
Richard Smith 02e85f3bc5 Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).
llvm-svn: 129541
2011-04-14 22:09:26 +00:00
Douglas Gregor 7df2126000 Harden Clang's cursor visitation logic against NULL declaration,
statement, and expression pointers. While these shouldn't happen, it's
better to be safe in libclang.

llvm-svn: 129539
2011-04-14 21:41:34 +00:00
Ted Kremenek 13b5a2c2f8 Add Objective-C++ files to those accepted by ccc-analyzer.
llvm-svn: 129475
2011-04-13 21:52:05 +00:00
Ted Kremenek f62a279e4c Provide options to explicitly enable/disable checkers in scan-build.
llvm-svn: 129393
2011-04-12 21:47:00 +00:00
Ted Kremenek 79c4c2baa9 Enable C++ static analysis support in ccc-analyzer.
llvm-svn: 129392
2011-04-12 21:46:57 +00:00
Oscar Fuentes 87eb515aba libclang output name is now libclang. This solves a name collision
when building with Visual Studio. `clang.dll' and `clang.exe' would
have the same `clang.ilk' and `clang.pdb'. On a serial build those
files would be overwritten as clang.exe/clang.dll are created. On a
parallel build there is a risk of both files being written at the same
time. On that case VS fails.

llvm-svn: 129239
2011-04-10 02:29:27 +00:00
Daniel Dunbar 529c03bc1e Driver: Sketch driver support for a CC_LOG_DIAGNOSTICS options, similar to the
existing CC_PRINT_OPTIONS and CC_PRINT_HEADERS, which can be used to
transparently capture the compiler diagnostics from a build.

llvm-svn: 129082
2011-04-07 18:01:20 +00:00
John McCall 319963434c Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use.  I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.

llvm-svn: 129065
2011-04-07 08:22:57 +00:00
Ted Kremenek 75bb01b47d Filter our experimental checks in scan-build's checker listing.
llvm-svn: 128865
2011-04-05 00:21:49 +00:00
Ted Kremenek c8e6f5110c Don't store reports when scan-build's build command matches /autogen/ (same as configure).
llvm-svn: 128723
2011-04-01 18:47:06 +00:00
Daniel Dunbar 9cf7bc7a6c Frontend/cc1as: Add support for -L.
llvm-svn: 128432
2011-03-28 22:49:24 +00:00
Chris Lattner ce6c42f65f switch a few Driver APIs to use llvm::ArrayRef, cleaning up code.
llvm-svn: 128142
2011-03-23 04:04:01 +00:00
Ted Kremenek 1ba9bbc149 Fix crash in clang_getInstantiationLoc() when SourceManager::getInstantiationLoc() can return a SourceLocatin with an invalid
FileID on invalid code.  Fixes <rdar://problem/9164623>.

llvm-svn: 128139
2011-03-23 02:16:44 +00:00
Douglas Gregor 20b2ebd785 Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

  void foo()
  __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

  - If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
    will result in a deprecation warning, as if we had placed
    attribute((deprecated)) on it (but with a better diagnostic)
  - If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
    will result in an "unavailable" warning (in C)/error (in C++), as
    if we had placed attribute((unavailable)) on it
  - If we choose a deployment target prior to 10.2, foo() is
    weak-imported (if it is a kind of entity that can be weak
    imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.

llvm-svn: 128127
2011-03-23 00:50:03 +00:00
Ted Kremenek 600b54c1e7 Hopefully fix VS build by not using std::vector::data().
llvm-svn: 128105
2011-03-22 20:16:19 +00:00
Ted Kremenek 022a4904fa Rework crash recovery cleanup in ASTUnit and CIndex to recover more memory during a Sema crash (we have just a handful of leaks left)
and to use the simplified cleanup registration API.

llvm-svn: 128059
2011-03-22 01:15:24 +00:00
Ted Kremenek 9acb346375 scan-build: only display analyzer intra-file progress when in "Verbose" mode.
llvm-svn: 128015
2011-03-21 20:12:21 +00:00
Ted Kremenek 5e14d39a88 Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes.
This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct
ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance
object.

llvm-svn: 128011
2011-03-21 18:40:17 +00:00
Bill Wendling a8da50d011 Pass in the TargetMachine parameter to the inst printer.
llvm-svn: 127987
2011-03-21 05:02:03 +00:00
Argyrios Kyrtzidis e762020bb9 In clang_parseTranslationUnit_Impl,p ut the source file after command_line_args otherwise
if '-x' flag is present it will be unused.

llvm-svn: 127971
2011-03-20 18:17:52 +00:00
Ted Kremenek 1ec7b33079 Add libclang hook 'clang_toggleCrashRecovery()', which provides a mechanism for a client to enable/disable CrashRecovery within libclang function calls.
llvm-svn: 127920
2011-03-18 23:05:39 +00:00
Ted Kremenek 21c7e6e298 Run all functional logic of clang_annotateTokens() within a CrashRecoveryContext. Fixes <rdar://problem/9121698>.
llvm-svn: 127919
2011-03-18 22:51:30 +00:00
Anders Carlsson c30dcecb5c Correctly store and keep track of the FileSystemOptions in ASTUnit and in clang_codeCompleteAt.
llvm-svn: 127890
2011-03-18 18:22:40 +00:00
Douglas Gregor c2b97994ea When libclang visits a translation unit via clang_visitChildren(),
walk the preprocessing record *before* walking the declarations, so
they we pretend that we actually respect the phases of translation.

We still walk the preprocessing record after the declarations when
performing token annotation or finding the cursor at a location, since
those routines depend on those semantics.

Fixes <rdar://problem/9137195>.

llvm-svn: 127776
2011-03-16 23:23:30 +00:00
Ted Kremenek d4bcb4ffc1 Compress argument processing in ccc-analyzer. No functionality change.
llvm-svn: 127758
2011-03-16 21:10:42 +00:00
Joerg Sonnenberger f6ce2fb1b3 Refactor program name logic. Extend it to infer the target triple from
the program name, if it includes it as proper prefix. This makes calling
clang with -ccc-host-triple x86_64-linux the same as calling it with the
name x86_64-linux-clang.

llvm-svn: 127753
2011-03-16 20:15:43 +00:00
Ted Kremenek 6f7008dcb6 c-index-test shouldn't crash when a goto has no matching label. Fixes <rdar://problem/9123493>.
llvm-svn: 127711
2011-03-15 23:47:49 +00:00
Oscar Fuentes a29f7b2591 Fix LIBCLANG_LINK_FLAGS for Darwin.
The previous syntax created a list with the usual semicolon as
separator, which breaks the link command.

llvm-svn: 127579
2011-03-14 14:32:16 +00:00
Oscar Fuentes 7221610543 Build libclang as a static library too. Now tested on Windows!
On Windows only the shared library is created. The reason for this is
that clang.lib the static library would clash with clang.lib the
export library of the dll.

llvm-svn: 127566
2011-03-13 15:10:24 +00:00
Oscar Fuentes 89b17a43e7 Reverting "Build libclang as a static library too."
This reverts commit r127556. It breaks the build for MSVC.

llvm-svn: 127564
2011-03-13 04:28:29 +00:00
Oscar Fuentes 89374ea270 Build libclang as a static library too.
llvm-svn: 127556
2011-03-12 22:01:58 +00:00
Abramo Bagnara 6b6f051e5e Renamed OffsetOfNode::getRange to getSourceRange for uniformity.
llvm-svn: 127534
2011-03-12 09:45:03 +00:00
Peter Collingbourne e190dee7a5 Add support for the OpenCL vec_step operator, by generalising and
extending the existing support for sizeof and alignof.  Original
patch by Guy Benyei.

llvm-svn: 127475
2011-03-11 19:24:49 +00:00
Ted Kremenek 339f7c3c58 Tweak ccc-analyzer's 'Analyze' function to not mutate the original arguments list.
llvm-svn: 127428
2011-03-10 21:10:08 +00:00
NAKAMURA Takumi d3cc220d97 c-index-test.c: Fix cygwin warning not to pass signed char to islower(c).
Cygwin's ctype.h says;
/* These macros are intentionally written in a manner that will trigger
   a gcc -Wall warning if the user mistakenly passes a 'char' instead
   of an int containing an 'unsigned char'.
   (snip) */

llvm-svn: 127308
2011-03-09 03:02:28 +00:00
Argyrios Kyrtzidis 97d3a38c3e Add 'OverridenFilesKeepOriginalName' field in SourceManager which if true the SourceManager
should report the original file name for contents of files that were overriden by other files,
otherwise it should report the name of the new file. Default is true.

Also add similar field in PreprocessorOptions and pass similar parameter in ASTUnit::LoadFromCommandLine.

llvm-svn: 127289
2011-03-08 23:35:24 +00:00
NAKAMURA Takumi d24228afeb libclang/CIndexer.cpp: Apply a new API for Cygwin-1.7, instead of deprecated one.
llvm-svn: 127283
2011-03-08 22:17:33 +00:00
Douglas Gregor f2f0806f71 Teach libclang's token-annotation logic about context-sensitive
keywords for Objective-C+ and C++0x. 

llvm-svn: 127253
2011-03-08 17:10:18 +00:00
Joerg Sonnenberger b86f5f4106 If called as *cpp or *cpp-[^-]*, run only the preprocessor. If no
input is specified, use stdin implicitly. Based on a patch from
Roman Divacky.

llvm-svn: 127137
2011-03-06 23:31:01 +00:00
Douglas Gregor c81a7a2591 Rename the type argument for the iboutletcollection attribute to not
conflict with MinGW headers, from Kirk Beitz!

llvm-svn: 127127
2011-03-06 18:55:32 +00:00
Argyrios Kyrtzidis 11e6f0a6c3 Currently we can only remap a file by creating a MemoryBuffer and replacing the file contents with it.
Allow remapping a file by specifying another filename whose contents should be loaded if the original
file gets loaded. This allows to override files without having to create & load buffers in advance.

llvm-svn: 127052
2011-03-05 01:03:53 +00:00
Douglas Gregor 25b7e05b72 Fix the source range for a member access expression that includes a
nested-name-specifier and improve the detection of implicit 'this'
bases. Fixes <rdar://problem/8750392>.

llvm-svn: 126880
2011-03-02 21:06:53 +00:00
Douglas Gregor 64f38ae7ee Teach libclang how to visit the children of a C++ base-class specifier
(i.e., the TypeLoc describing the base class type).

llvm-svn: 126861
2011-03-02 19:17:03 +00:00
Douglas Gregor 9d80212115 Push nested-name-specifier source location information into template
template arguments. I believe that this is the last place in the AST
where we were storing a source range for a nested-name-specifier
rather than a proper nested-name-specifier location structure. (Yay!)

There is still a lot of cleanup to do in the TreeTransform, which
doesn't take advantage of nested-name-specifiers with source-location
information everywhere it could.

llvm-svn: 126844
2011-03-02 17:09:35 +00:00
Douglas Gregor a7a795bed1 Push nested-name-specifier source-location information into dependent
template specialization types. There are still a few rough edges to
clean up with some of the parser actions dropping
nested-name-specifiers too early.

llvm-svn: 126776
2011-03-01 20:11:18 +00:00
Douglas Gregor 844cb50266 Reinstate the introduction of source-location information for
nested-name-speciciers within elaborated type names, e.g.,
 
  enum clang::NestedNameSpecifier::SpecifierKind

Fixes in this iteration include:

  (1) Compute the type-source range properly for a dependent template
  specialization type that starts with "template template-id ::", as
  in a member access expression

    dep->template f<T>::f()

  This is a latent bug I triggered with this change (because now we're
  checking the computed source ranges for dependent template
  specialization types). But the real problem was...

  (2) Make sure to set the qualifier range on a dependent template
  specialization type appropriately. This will go away once we push
  nested-name-specifier locations into dependent template
  specialization types, but it was the source of the
  valgrind errors on the buildbots.
  

llvm-svn: 126765
2011-03-01 18:12:44 +00:00
Douglas Gregor b3a58b08e0 Revert r126748, my second attempt at nested-name-specifier source
location information for elaborated types. *sigh*

llvm-svn: 126753
2011-03-01 17:25:47 +00:00
Douglas Gregor bf5fe47b12 Reinstate r126737, extending the generation of type-source location
information for qualifier type names throughout the parser to address
several problems.

The commit message from r126737:

Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.

llvm-svn: 126748
2011-03-01 16:31:39 +00:00
Douglas Gregor 62a60c50f4 Revert r126737, the most recent nested-name-specifier location change, for buildbot breakage.
llvm-svn: 126746
2011-03-01 15:34:37 +00:00
Douglas Gregor 9720642c68 Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.

llvm-svn: 126737
2011-03-01 03:11:17 +00:00
Douglas Gregor 3d0da5f5dd Push nested-name-specifier source location information into
DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to
walk DependentNameTypeLoc nodes.

Also, teach libclang about TypedefDecl source ranges, so that we get
those. The massive churn in test/Index/recursive-cxx-member-calls.cpp
is a good thing: we're annotating a lot more of this test correctly
now.

llvm-svn: 126729
2011-03-01 01:34:45 +00:00
Douglas Gregor ea972d3faa Push nested-name-specifier location information into DeclRefExpr and
MemberExpr, the last of the expressions with qualifiers!

llvm-svn: 126688
2011-02-28 21:54:11 +00:00
Douglas Gregor 0da1d43e16 Push nested-name-specifier source location information into
UnresolvedLookupExpr and UnresolvedMemberExpr.

Also, improve the computation that checks whether the base of a member
expression (either unresolved or dependent-scoped) is implicit. The
previous check didn't cover all of the cases we use in our
representation, which threw off source-location information for these
expressions (which, in turn, caused some breakage in libclang's token
annotation). 

llvm-svn: 126681
2011-02-28 20:01:57 +00:00
Douglas Gregor e16af53619 Push nested-name-specifier source location information into
CXXDependentScopeMemberExpr, and clean up instantiation of
nested-name-specifiers with dependent template specialization types in
the process.

llvm-svn: 126663
2011-02-28 18:50:33 +00:00
NAKAMURA Takumi 8fbf64f420 [PR9321] "make install" does not need install c-index-test. It is used for testing.
llvm-svn: 126634
2011-02-28 05:21:34 +00:00
Benjamin Kramer 6e152156d5 Fix an obvious typo.
GCC -Waddress warns about this but clang doesn't (PR9043).

llvm-svn: 126577
2011-02-27 18:07:41 +00:00
Daniel Dunbar 160fc36896 cc1: Fix stats printing by default when using -mllvm -stats.
llvm-svn: 126559
2011-02-26 23:17:25 +00:00
Ted Kremenek 27fdf0feda Enhance scan-build to print out available analyses using new checker registration model.
This isn't totally complete.  Right now scan-build uses some heuristics to determine
which checkers are enabled by default, but it cannot always tell which checkers
are not enabled.

llvm-svn: 126521
2011-02-25 22:00:40 +00:00
Douglas Gregor 3a43fd645d Push nested-name-specifier source location information into
DependentScopeDeclRefExpr. Plus, give NestedNameSpecifierLoc == and !=
operators, since we're going to need 'em elsewhere.

llvm-svn: 126508
2011-02-25 20:49:16 +00:00
Douglas Gregor be8705bd3f CMake: add version information into the clang executable and libclang
shared library.

llvm-svn: 126502
2011-02-25 19:24:02 +00:00
Douglas Gregor a6ce608b97 Push nested-name-specifier source-location information into
pseudo-destructor expressions. Also, clean up some
template-instantiation and type-checking issues with
pseudo-destructors.

llvm-svn: 126498
2011-02-25 18:19:59 +00:00
Douglas Gregor c05ba2ef12 Push nested-name-specifier source location information into namespace
aliases.

llvm-svn: 126496
2011-02-25 17:08:07 +00:00
Douglas Gregor 12441b3bc5 Push nested-name-specifier source location information into using directives.
llvm-svn: 126489
2011-02-25 16:33:46 +00:00
Douglas Gregor 144548072d Use NestedNameSpecifierLoc within out-of-line variables, function, and
tag definitions. Also, add support for template instantiation of
NestedNameSpecifierLocs.

llvm-svn: 126470
2011-02-25 02:25:35 +00:00
Douglas Gregor a9d87bc6ac Update UsingDecl, UnresolvedUsingTypenameDecl, and
UnresolvedUsingValueDecl to use NestedNameSpecifierLoc rather than the
extremely-lossy NestedNameSpecifier/SourceRange pair it used to use,
improving source-location information.

Various infrastructure updates to support NestedNameSpecifierLoc:
  - AST/PCH (de-)serialization
  - Recursive AST visitor
  - libclang traversal (including the first tests of this
    functionality)

llvm-svn: 126459
2011-02-25 00:36:19 +00:00
Douglas Gregor 7b26ff912f Teach NestedNameSpecifier to keep track of namespace aliases the same
way it keeps track of namespaces. Previously, we would map from the
namespace alias to its underlying namespace when building a
nested-name-specifier, losing source information in the process.

llvm-svn: 126358
2011-02-24 02:36:08 +00:00
Ted Kremenek c49211c79a Add null check in CursorVisitor::RunVisitorWorkList() when visiting LabelDecls. Fixes <rdar://problem/9040579>.
llvm-svn: 126304
2011-02-23 04:54:51 +00:00
Oscar Fuentes e16dc2a6e7 CMAKE_EXECUTABLE_SUFFIX is undefined when a cmake script is executed
with cmake -P ... so we need to deduce the correct executable prefix.

Fixes PR9286.

llvm-svn: 126219
2011-02-22 13:05:15 +00:00
Ted Kremenek bda17491c4 Fix call to send_error() in scan-view. An int error code is expected but a string was being sent. Patch by Andrew Price!
llvm-svn: 126138
2011-02-21 19:26:48 +00:00