Commit Graph

3660 Commits

Author SHA1 Message Date
Alexey Bataev 86e786bd17 [MSVC] Late parsing of in-class defined member functions in template
classes.

MSVC actively uses unqualified lookup in dependent bases, lookup at the
instantiation point (non-dependent names may be resolved on things
declared later) etc. and all this stuff is the main cause of
incompatibility between clang and MSVC.

Clang tries to emulate MSVC behavior but it may fail in many cases.
clang could store lexed tokens for member functions definitions within
ClassTemplateDecl for later parsing during template instantiation.

It will allow resolving many possible issues with lookup in dependent
base classes and removing many already existing MSVC-specific
hacks/workarounds from the clang code.

llvm-svn: 272774
2016-06-15 11:19:39 +00:00
Olivier Goffart 692d533100 Make sizeof and alignof a CXCursor_UnaryExpr
So we can match sizeof expressions more accurately than with UnexposedExpr

Differential Revision: http://reviews.llvm.org/D18081

llvm-svn: 272274
2016-06-09 16:16:06 +00:00
Olivier Goffart 81978014c5 CIndex: add support for static_assert
Differential Revision: http://reviews.llvm.org/D18080

llvm-svn: 272273
2016-06-09 16:15:55 +00:00
Richard Smith dfed58a527 Update to match LLVM r272232.
llvm-svn: 272233
2016-06-09 00:53:41 +00:00
Manman Ren 04fd4d8bae Indexer: add CXObjCPropertyAttr_class for class properties.
rdar://25963227

llvm-svn: 271351
2016-05-31 23:22:04 +00:00
Chris Bieneman f8ebfc4b65 [CMake] Update to requiring CMake 3.4.3
Summary:
This is as per the discussions on developer lists:

http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html
http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D20823

llvm-svn: 271326
2016-05-31 20:21:38 +00:00
Ehsan Akhgari b743de7fb9 clang-c: Add the clang_getCursorVisibility() API
This patch adds an API for querying the visibility of the entity
referred to by a cursor.

Patch by Michael Wu <mwu@mozilla.com>.

llvm-svn: 271292
2016-05-31 15:55:51 +00:00
Ehsan Akhgari 3a562e6f70 Revert r253909 because it was committed with an incorrect message
llvm-svn: 271291
2016-05-31 15:39:10 +00:00
Rafael Espindola f8f01c3d59 Handle -Wa,--mrelax-relocations=[no|yes].
llvm-svn: 271162
2016-05-29 02:01:14 +00:00
Benjamin Kramer cfeacf56f0 Apply clang-tidy's misc-move-constructor-init throughout Clang.
No functionality change intended, maybe a tiny performance improvement.

llvm-svn: 270996
2016-05-27 14:27:13 +00:00
George Rimar 0976dc1b2a Update for following LLVM commit.
It will be:
Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.

llvm-svn: 270985
2016-05-27 12:15:25 +00:00
Samuel Antao ec172c6da0 [OpenMP] Parsing and sema support for the from clause
Summary:
The patch contains the parsing and sema support for the `from` clause. 

Patch based on the original post by Kelvin Li.

Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev

Subscribers: caomhin, cfe-commits

Differential Revision: http://reviews.llvm.org/D18488

llvm-svn: 270882
2016-05-26 17:49:04 +00:00
Samuel Antao 661c0904e1 [OpenMP] Parsing and sema support for the to clause
Summary:
The patch contains the parsing and sema support for the `to` clause. 

Patch based on the original post by Kelvin Li.

Reviewers: carlo.bertolli, hfinkel, kkwli0, arpith-jacob, ABataev

Subscribers: caomhin, cfe-commits

Differential Revision: http://reviews.llvm.org/D18597

llvm-svn: 270880
2016-05-26 17:39:58 +00:00
Samuel Antao 686c70c3dc [OpenMP] Parsing and sema support for target update directive
Summary:
This patch is to add parsing and sema support for `target update` directive. Support for the `to` and `from` clauses will be added by a different patch.  This patch also adds support for other clauses that are already implemented upstream and apply to `target update`, e.g. `device` and `if`.

This patch is based on the original post by Kelvin Li.

Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev

Subscribers: caomhin, cfe-commits

Differential Revision: http://reviews.llvm.org/D15944

llvm-svn: 270878
2016-05-26 17:30:50 +00:00
Rafael Espindola e64e230dec Update for llvm change.
llvm-svn: 269910
2016-05-18 11:58:56 +00:00
Nemanja Ivanovic bb1ea2d613 Enable support for __float128 in Clang and enable it on pertinent platforms
This patch corresponds to reviews:
http://reviews.llvm.org/D15120
http://reviews.llvm.org/D19125

It adds support for the __float128 keyword, literals and target feature to
enable it. Based on the latter of the two aforementioned reviews, this feature
is enabled on Linux on i386/X86 as well as SystemZ.
This is also the second attempt in commiting this feature. The first attempt
did not enable it on required platforms which caused failures when compiling
type_traits with -std=gnu++11.

If you see failures with compiling this header on your platform after this
commit, it is likely that your platform needs to have this feature enabled.

llvm-svn: 268898
2016-05-09 08:52:33 +00:00
David Blaikie 263942f590 [scan-build] fix dead store warnings emitted on clang code base
This fixes dead store warnings of the type "dead assignment" reported
by CLang Static Analyzer on the following file:

- tools/c-index-test/c-index-test.c.

Patch by Apelete Seketeli <apelete@seketeli.net>!

Differential Revision: http://reviews.llvm.org/D19831

llvm-svn: 268453
2016-05-03 22:14:14 +00:00
Sergey Kalinichev 69770aee36 [libclang] Expose the ElaboratedType
Differential Revision: http://reviews.llvm.org/D11797

llvm-svn: 268366
2016-05-03 06:58:29 +00:00
Jonathan Coe 2956535b7c Expose cxx constructor and method properties through libclang and python bindings.
Summary:
I have exposed the following function through libclang and the clang.cindex python bindings:

clang_CXXConstructor_isConvertingConstructor,
clang_CXXConstructor_isCopyConstructor,
clang_CXXConstructor_isDefaultConstructor,
clang_CXXConstructor_isMoveConstructor,
clang_CXXMethod_isDefaulted

I need (some of) these methods for a C++ code model I am building in Python to drive a code generator.

Reviewers: compnerd, skalinichev

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15469

llvm-svn: 267706
2016-04-27 12:48:25 +00:00
Nico Weber 47bf505775 driver: Add a `--rsp-quoting` flag to pick response file quoting.
Currently, clang-cl always uses Windows style for unquoting, and clang always
uses POSIX style for unquoting.

With this flag, it's possible to change these defaults.

In general, response file quoting should match the shell the response file is
used in.  On Windows, it's possible to run clang-cl in a bash shell, or clang in
cmd.exe, so a flag for overriding the default behavior is natural there.

On non-Windows, Windows quoting probably never makes sense (except maybe in
Wine), but having clang-cl behave differently based on the host OS seems
strange too.  So require that people who want to use posix-style response
files with clang-cl on non-Windows pass --rsp-quoting=posix.

http://reviews.llvm.org/D19425

llvm-svn: 267474
2016-04-25 21:15:49 +00:00
Argyrios Kyrtzidis f30c8c621f [index] Add a SymbolSubKind for an ObjC unit test.
llvm-svn: 267117
2016-04-22 07:21:10 +00:00
Argyrios Kyrtzidis f2142cbca8 [index] Change SymbolCXXTemplateKind to a 'SymbolSubKinds' bitset.
This provides a more general and flexible way to annotate special symbols.

llvm-svn: 267116
2016-04-22 07:21:04 +00:00
Stephen Hines a978a076a9 MarkEOLs should only be true for clang-cl.exe.
Summary:
https://llvm.org/bugs/show_bug.cgi?id=27396

This fixes an issue in response files where "\r\n" was being interpreted
as two EOL markers (i.e. we consumed the '\r' as terminating the
previous token, and then parsed the '\n' as a significant EOL). This
breaks response files where joined arguments get split across multiple
lines (like "-x\r\nc"). I also fixed an accidental issue in the
response-file.c test, where the response file is appended to, instead of
being overwritten.

Reviewers: rnk

Subscribers: danalbert, llvm-commits

Differential Revision: http://reviews.llvm.org/D19289

llvm-svn: 266840
2016-04-20 00:33:06 +00:00
Adrian Prantl ae39ccc49f cc1as: Don't crash when CIE is requested and no DWARF version is specified.
This patch changes the default DWARF version for cc1as from invalid 0 to 2,
which should be the lowest common denominator on all platforms.

rdar://problem/24735813

llvm-svn: 266814
2016-04-19 20:31:19 +00:00
Laszlo Nagy 8bd63e5518 D17487: [analyzer][scan-build-py] flag filter modification for compilation database creation
llvm-svn: 266726
2016-04-19 12:03:03 +00:00
Nemanja Ivanovic d7d45bf8ce Revert 266186 as it breaks anything that includes type_traits on some platforms
Since this patch provided support for the __float128 type but disabled it
on all platforms by default, some platforms can't compile type_traits with
-std=gnu++11 since there is a specialization with __float128.
This reverts the patch until D19125 is approved (i.e. we know which platforms
need this support enabled).

llvm-svn: 266460
2016-04-15 18:04:13 +00:00
David Blaikie bbc00888dd libclang: Use early-return to reduce indentation.
& since I'll get blamed for all the lines anyway, remove some
else-after-return and otherwise tidy things up.

llvm-svn: 266224
2016-04-13 18:36:19 +00:00
David Blaikie 5927257206 Simplify memory management of CXEvalResultKind/ExprEvalResult using unique_ptr and a dtor
This doesn't seem to need to be a C type, C only handles a void*, so use
new/delete as usual to simplify allocation and cleanup.

Follow-up to r265994

llvm-svn: 266222
2016-04-13 18:23:33 +00:00
Nemanja Ivanovic 50f29e06a1 Enable support for __float128 in Clang
This patch corresponds to review:
http://reviews.llvm.org/D15120

It adds support for the __float128 keyword, literals and a target feature to
enable it. This support is disabled by default on all targets and any target
that has support for this type is free to add it.

Based on feedback that I've received from target maintainers, this appears to
be the right thing for most targets. I have not heard from the maintainers of
X86 which I believe supports this type. I will subsequently investigate the
impact of enabling this on X86.

llvm-svn: 266186
2016-04-13 09:49:45 +00:00
Alexey Bader b62f14400f [OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library.
Putting OpenCLImageTypes.def to clangAST library violates layering requirement: "It's not OK for a Basic/ header to include an AST/ header".
This fixes the modules build.

Differential revision: http://reviews.llvm.org/D18954
Reviewers: Richard Smith, Vassil Vassilev.

llvm-svn: 266180
2016-04-13 08:33:41 +00:00
Hans Wennborg 6917b4ac5a libclang: fix two memory leaks (PR26292)
llvm-svn: 265994
2016-04-11 20:53:59 +00:00
Chris Bieneman 834a40b463 [Perf-Training] Reworked workflow improvements for order-file generation
This is re-landing r260742. I've reworked the conditionals so that it only hits when targeting Apple platforms with ld64.

Original Summary:
With this change generating clang order files using dtrace uses the following workflow:

cmake <whatever options you want>

ninja generate-order-file

ninja clang

This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one.

CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file.

llvm-svn: 265864
2016-04-08 22:48:18 +00:00
Alexey Bader 954ba21f85 [OpenCL] Complete image types support.
I. Current implementation of images is not conformant to spec in the following points:
  1. It makes no distinction with respect to access qualifiers and therefore allows to use images with different access type interchangeably. The following code would compile just fine:

        void write_image(write_only image2d_t img);
        kernel void foo(read_only image2d_t img) { write_image(img); } // Accepted code

     which is disallowed according to s6.13.14.

  2. It discards access qualifier on generated code, which leads to generated code for the above example:

        call void @write_image(%opencl.image2d_t* %img);

     In OpenCL2.0 however we can have different calls into write_image with read_only and wite_only images.
     Also generally following compiler steps have no easy way to take different path depending on the image access: linking to the right implementation of image types, performing IR opts and backend codegen differently.

  3. Image types are language keywords and can't be redeclared s6.1.9, which can happen currently as they are just typedef names.
  4. Default access qualifier read_only is to be added if not provided explicitly.

II. This patch corrects the above points as follows:
  1. All images are encapsulated into a separate .def file that is inserted in different points where image handling is required. This avoid a lot of code repetition as all images are handled the same way in the code with no distinction of their exact type.
  2. The Cartesian product of image types and image access qualifiers is added to the builtin types. This simplifies a lot handling of access type mismatch as no operations are allowed by default on distinct Builtin types. Also spec intended access qualifier as special type qualifier that are combined with an image type to form a distinct type (see statement above - images can't be created w/o access qualifiers).
  3. Improves testing of images in Clang.

Author: Anastasia Stulova
Reviewers: bader, mgrang.
Subscribers: pxli168, pekka.jaaskelainen, yaxunl.
Differential Revision: http://reviews.llvm.org/D17821

llvm-svn: 265783
2016-04-08 13:40:33 +00:00
Vedant Kumar f27d227409 [c-index-test] Fix leak in print_completion_result, NFC
llvm-svn: 265252
2016-04-03 00:54:46 +00:00
Argyrios Kyrtzidis 66c49f78a3 [index] Fix regression where ObjC method declarations may mistakenly get indexed as definition.
rdar://25372906

llvm-svn: 265042
2016-03-31 20:18:22 +00:00
Vedant Kumar b64d86ff8e [c-index-test] Delete dead function, NFC
llvm-svn: 264874
2016-03-30 16:03:02 +00:00
Chris Bieneman 54e3b5ace0 [Order Files] Fix order file usage
The CMake EXISTS operator needs to have the variable expanded. Not expanding this was causing the if statement to always be false, which made it impossible to pass linker order files in.

llvm-svn: 264757
2016-03-29 17:51:08 +00:00
Ben Langmuir 443913f4d6 [index] Remove redundancy between symbol kind and language
Condense the ObjCKIND and CXXKIND options into just KIND, since the
language was already specified on a per-symbol basis and this
information was redundant. This only changes the internal
representation; naturally the libclang interface remains the same.

llvm-svn: 264423
2016-03-25 17:01:59 +00:00
Roman Levenstein 35aa5cecf2 Add attributes for preserve_mostcc/preserve_allcc calling conventions to the C/C++ front-end
Till now, preserve_mostcc/preserve_allcc calling convention attributes were only
available at the LLVM IR level. This patch adds attributes for
preserve_mostcc/preserve_allcc calling conventions to the C/C++ front-end.

The code was mostly written by Juergen Ributzka.
I just added support for the AArch64 target and tests.

Differential Revision: http://reviews.llvm.org/D18025

llvm-svn: 263647
2016-03-16 18:00:46 +00:00
Alexey Bataev 78849fb464 [OPENMP 4.5] Codegen for data members in 'linear' clause.
OpenMP 4.5 allows to use data members in private clauses. Patch adds
codegen support for 'linear' clause.

llvm-svn: 263002
2016-03-09 09:49:00 +00:00
Argyrios Kyrtzidis 542f38f31f [index] libclang: Make sure to treat forward ObjC protocols as ObjCProtocolRef declarations, and fix related crash.
rdar://25035376

llvm-svn: 262985
2016-03-09 02:12:46 +00:00
Alexey Bataev 37e594c799 [OPENMP] Simplify handling of clauses with postupdates, NFC.
Clauses with post-update expressions always have pre-init statement. So
OMPClauseWithPreInit now is the base for OMPClauseWithPostUpdate.

llvm-svn: 262696
2016-03-04 07:21:16 +00:00
NAKAMURA Takumi dd30704201 Tweak CMakeLists not for libclang to depend on the variable CLANG_TOOL_EXTRA_BUILD.
llvm-svn: 262606
2016-03-03 11:09:43 +00:00
Benjamin Kramer c1ffdab3fb [libclang] Link clang-tidy plugin into libclang if present.
This is a sad workaround for the lack of plugin support in libclang. Depends
on D17807, a tools-extra change that also contains the test case.

This is designed to be easy to remove again if libclang ever grows proper
plugin support.

Differential Revision: http://reviews.llvm.org/D17808

llvm-svn: 262596
2016-03-03 08:58:18 +00:00
John McCall 477f2bb0d5 Semantic analysis for the swiftcall calling convention.
I've tried to keep the infrastructure behind parameter ABI
treatments fairly general.

llvm-svn: 262587
2016-03-03 06:39:32 +00:00
Alexey Bataev 94a4f0cb5f [OPENMP 4.0] Initial support for 'omp declare reduction' construct.
Add parsing, sema analysis and serialization/deserialization for 'declare reduction' construct.
User-defined reductions are defined as

#pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )]
These custom reductions may be used in 'reduction' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The
combiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will
denote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting
combined value after executing the combiner.
As the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause
will be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier
omp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced.
Differential Revision: http://reviews.llvm.org/D11182

llvm-svn: 262582
2016-03-03 05:21:39 +00:00
Nico Weber cbbaeb1307 Serialize `#pragma detect_mismatch`.
This is like r262493, but for pragma detect_mismatch instead of pragma comment.
The two pragmas have similar behavior, so use the same approach for both.

llvm-svn: 262506
2016-03-02 19:28:54 +00:00
Nico Weber 6622029d5e Serialize `#pragma comment`.
`#pragma comment` was handled by Sema calling a function on ASTConsumer, and
CodeGen then implementing this function and writing things to its output.

Instead, introduce a PragmaCommentDecl AST node and hang one off the
TranslationUnitDecl for every `#pragma comment` line, and then use the regular
serialization machinery. (Since PragmaCommentDecl has codegen relevance, it's
eagerly deserialized.)

http://reviews.llvm.org/D17799

llvm-svn: 262493
2016-03-02 17:28:48 +00:00
Alexey Bataev 61205070c4 [OPENMP 4.5] Codegen for data members in 'reduction' clause.
OpenMP 4.5 allows to privatize non-static data members of current class
in non-static member functions. Patch supports codegen for non-static
data members in 'reduction' clauses.

llvm-svn: 262460
2016-03-02 04:57:40 +00:00
Manuel Klimek 016c024ca4 Optionally demote fatal errors to non-fatal errors.
This behavior is enabled when the new CXTranslationUnit_KeepGoing
option is passed to clang_parseTranslationUnit{,2}. It is geared
towards use by IDEs and similar consumers of the clang-c API where
fatal errors may arise when parsing incomplete code mid-edit, or
when include paths are not properly configured yet. In such situations
one still wants to get as much information as possible about a TU.
Previously, the semantic analysis would not instantiate templates
or report additional fatal errors after the first fatal error was
encountered.

Fixes PR24268.

Patch by Milian Wolff.

llvm-svn: 262318
2016-03-01 10:56:19 +00:00
Argyrios Kyrtzidis 113387e08e [index] Print and test module import references.
llvm-svn: 262208
2016-02-29 07:56:07 +00:00
Alexey Bataev 005248ac8a [OPENMP 4.5] Codegen for member decls in 'lastprivate' clause.
OpenMP 4.5 allows to privatize non-static member decls in non-static
member functions. Patch captures such decls by reference in general (for
bitfields, by value) and then operates with this capture. For bitfields,
at the end of codegen for lastprivates original bitfield is updated with the value of captured copy.

llvm-svn: 261824
2016-02-25 05:25:57 +00:00
Chris Bieneman 5b21af5222 [CMake] Add install-clang-format target by migrating to add_clang_tool
This change migrates clang-format to add_clang_tool which makes a component-based install target. To support component-based installation the extra installed scripts all need to have the "clang-format" component too.

llvm-svn: 261680
2016-02-23 20:33:15 +00:00
Anton Yartsev 6e135f45a8 [analyzer][scan-build] Non-existing directory for scan-build output.
Makes scan-build successfully accept non-existing output directories provided via "-o" option. The directory is created in this case. This behavior is conforming to the old perl scan-build implementation.
(http://reviews.llvm.org/D17091)

llvm-svn: 261480
2016-02-21 17:04:26 +00:00
Argyrios Kyrtzidis 223838aea2 [c-index-test] CMake: When installing c-index-test to a different prefix directory, add an rpath so that
it can find libclang.

llvm-svn: 261445
2016-02-20 20:34:55 +00:00
Yury Gribov a6560ebe4c [analyzer] Add --force-analyze-debug-code option to scan-build
to force debug build and hopefully enable more precise warnings.

Static Analyzer is much more efficient when built in debug mode
(-UNDEBUG) so we advice users to enable it manually. This may be
inconvenient in case of large complex projects (think about Linux
distros e.g. Android or Tizen). This patch adds a flag to scan-build
which inserts -UNDEBUG automatically.

Differential Revision: http://reviews.llvm.org/D16200

llvm-svn: 261204
2016-02-18 11:08:46 +00:00
Alexey Bataev 417089fc7e [OPENMP 4.5] Codegen support for data members in 'firstprivate' clause.
Added codegen for captured data members in non-static member functions.

llvm-svn: 261089
2016-02-17 13:19:37 +00:00
Chandler Carruth ce55f56fbc [cmake] Revert r260742 (and r260744) to improve order file support.
This appears to be passing '-Wl,-order_file' to Linux link commands,
which then causes the linker to silently, behind the scenes, write the
output to 'rder_file' instead of somewhere else. Will work with Chris to
figure out the proper support for this, but so far there are numerous
people who can't get Clang to update when they build because of this.

llvm-svn: 261054
2016-02-17 02:13:35 +00:00
Alexey Bataev 3392d76081 [OPENMP] Improved handling of pseudo-captured expressions in OpenMP.
Expressions inside 'schedule'|'dist_schedule' clause must be captured in
combined directives to avoid possible crash during codegen. Patch
improves handling of such constructs

llvm-svn: 260954
2016-02-16 11:18:12 +00:00
Argyrios Kyrtzidis d571908445 [AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in printing policy.
Enable it for USRs and names when indexing.
Forward references can have different template argument names; including them
makes USRs and names unstable, since the name depends on whether we saw a forward reference or not.

llvm-svn: 260866
2016-02-15 01:32:36 +00:00
Saleem Abdulrasool 9b0ac33457 silence -Wreturn-type warnings
These codepaths would generate warnings with GCC on linux even though the switch
was covered.  Add llvm_unreachable markers to indicate that the switch should be
covered.  NFC.

llvm-svn: 260865
2016-02-15 00:36:52 +00:00
Argyrios Kyrtzidis ca741cef3e [index] Factor libclang's functionality to determing the mangled name of symbols into the clangIndex library.
llvm-svn: 260858
2016-02-14 22:30:14 +00:00
Benjamin Kramer 24c2a9a4e4 Don't leak the ASTUnit when done with testing.
Found by lsan.

llvm-svn: 260850
2016-02-14 13:18:06 +00:00
NAKAMURA Takumi 15c4ce4c50 c-index-test: Fix libdeps corresponding to r260841.
llvm-svn: 260847
2016-02-14 09:19:04 +00:00
Argyrios Kyrtzidis 8513ab6080 [c-index-test] Fix a gcc build error.
llvm-svn: 260844
2016-02-14 07:08:31 +00:00
Argyrios Kyrtzidis 3b72d0f333 [index] Fix gcc builds.
llvm-svn: 260843
2016-02-14 06:53:20 +00:00
Argyrios Kyrtzidis 6fdcb9c590 [index] Enhance c-index-test tool and have it link and test the clangIndex library directly.
llvm-svn: 260842
2016-02-14 06:39:11 +00:00
Argyrios Kyrtzidis 469c1367f1 [index] Allow calling createIndexingAction() without passing another action to wrap over.
llvm-svn: 260841
2016-02-14 06:39:03 +00:00
Benjamin Kramer 0772c42385 Reduce the number of implicit StringRef->std::string conversions by threading StringRef through more APIs.
No functionality change intended.

llvm-svn: 260815
2016-02-13 13:42:54 +00:00
NAKAMURA Takumi 93e0200e23 libclang/CMakeLists.txt: Prune IndexingContext.h out of ADDITIONAL_HEADERS. VS IDE uses it.
llvm-svn: 260802
2016-02-13 04:01:49 +00:00
Argyrios Kyrtzidis f4fb85b1c7 [libclang] Separate the underlying indexing functionality of libclang and introduce it into the clangIndex library.
It is a general goodness for libclang itself to mostly be a wrapper of functionality provided by the libraries.

llvm-svn: 260760
2016-02-12 23:10:59 +00:00
Chris Bieneman 3878bc4a33 [CMake] Improve the clang order-file generation workflow
Summary:
This commit re-lands r259862. The underlying cause of the build breakage was an incorrectly written capabilities test. In tools/Driver/CMakeLists.txt I was attempting to check if a linker flag worked, the test was passing it to the compiler, not the linker. CMake doesn't have a linker test, so we have a hand-rolled one.

Original Patch Review: http://reviews.llvm.org/D16896

Original Summary:
With this change generating clang order files using dtrace uses the following workflow:

cmake <whatever options you want>

ninja generate-order-file

ninja clang

This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one.

CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file.

Reviewers: bogner

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16999

llvm-svn: 260742
2016-02-12 21:36:55 +00:00
Alexey Bataev 4244be25bd [OPENMP] Rename OMPCapturedFieldDecl to OMPCapturedExprDecl, NFC.
OMPCapturedExprDecl allows caopturing not only of fielddecls, but also
other expressions. It also allows to simplify codegen for several
clauses.

llvm-svn: 260492
2016-02-11 05:35:55 +00:00
Anton Yartsev 5cba8d5fb5 [analyzer] Windows: launch scan-build from an arbitrary location.
The following batch files allow to launch scan-build from an arbitrary location if path to clang\tools\scan-build-py\bin is added to %PATH%.

llvm-svn: 260420
2016-02-10 19:46:41 +00:00
Eugene Zelenko 0a4f3f4373 Fix some Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D17060

llvm-svn: 260414
2016-02-10 19:11:58 +00:00
Daniel Jasper 36e979af73 clang-format sort include use the source file name to determine the
"main include" that will be the 1st include (category 0).

Because the clang-format visual studio extension does not pass the file
name and use the standard input, sort include cannot find a "main
include":

Testing fix on llvm\tools\clang\lib\Format\Format.cpp:
Original file:
  #include "clang/Format/Format.h"
  ...
  #include "clang/Basic/SourceManager.h"
  #include "clang/Lex/Lexer.h"

Without fix, selecting the includes and running visual studio
clang-format:
  ...
  #include "clang/Basic/SourceManager.h"
  #include "clang/Format/Format.h"
  #include "clang/Lex/Lexer.h"

With fix, selecting the includes and running visual studio clang-format:
  #include "clang/Format/Format.h"
  ...
  #include "clang/Basic/SourceManager.h"
  #include "clang/Lex/Lexer.h"

Test 2 with main header not at the start:
Original file:
  ...
  #include "clang/Format/Format.h"
  #include "clang/Basic/SourceManager.h"
  #include "clang/Lex/Lexer.h"

Without fix, selecting the includes and running visual studio
clang-format:
  ...
  #include "clang/Basic/SourceManager.h"
  #include "clang/Format/Format.h"
  #include "clang/Lex/Lexer.h"

With fix, selecting the includes and running visual studio clang-format:
  #include "clang/Format/Format.h"
  ...
  #include "clang/Basic/SourceManager.h"
  #include "clang/Lex/Lexer.h"

Patch by Jean-Philippe Dufraigne, thank you.
Review: http://reviews.llvm.org/D16524

llvm-svn: 260378
2016-02-10 12:42:58 +00:00
NAKAMURA Takumi cd4d945525 libclang: Enable skip-parsed-bodies on win32.
I guess it would be working since Rafael's r187619.

llvm-svn: 260344
2016-02-10 01:29:57 +00:00
Argyrios Kyrtzidis ca4ad1937c [libclang] indexing: make sure to not visit init-list expressions twice.
llvm-svn: 260255
2016-02-09 19:07:24 +00:00
Argyrios Kyrtzidis 49385e8bd5 [libclang] indexing: handle 'TopLevelDeclInObjCContainers' at the point where they are reported.
It isn't much benefit and doesn't worth the complexity to try to handle them after the container is encountered.

llvm-svn: 260254
2016-02-09 19:07:21 +00:00
Argyrios Kyrtzidis a4cffec19e [libclang] indexing: for a synthesized property reference have the parent be the ObjC implementation decl.
llvm-svn: 260253
2016-02-09 19:07:19 +00:00
Argyrios Kyrtzidis af75b19736 [libclang] indexing: Have the semantic container of synthesized ObjC getter/setter methods be the implementation decl.
Matches the behavior of other ObjC methods.

llvm-svn: 260250
2016-02-09 19:07:07 +00:00
Aaron Ballman 774e8fe49a Move static functions returning UDTs outside of the extern "C" block. Silences an MSVC warning, and reduces the number of exported symbols.
llvm-svn: 260104
2016-02-08 15:52:13 +00:00
Alexey Bataev 90c228f0ba [OPENMP 4.5] Ccapture/codegen of private non-static data members.
OpenMP 4.5 introduces privatization of non-static data members of current class in non-static member functions.
To correctly handle such kind of privatization a new (pseudo)declaration VarDecl-based node is added. It allows to reuse an existing code for capturing variables in Lambdas/Block/Captured blocks of code for correct privatization and codegen.

llvm-svn: 260077
2016-02-08 09:29:13 +00:00
Saleem Abdulrasool 5e03c655a3 Index: provide adjustment thunk information for C++ manglings
Add support for exposing the adjustment thunk for virtual methods as
appropriate.

llvm-svn: 260011
2016-02-06 22:36:34 +00:00
Chris Bieneman 06d29a2466 [CMake] One more try to make CMake clean up after itself
Seriously... CMake... You're on my list...

llvm-svn: 259873
2016-02-05 03:59:08 +00:00
Chris Bieneman dc76e70b2a Revert "[CMake] Improve the clang order-file generation workflow"
This reverts commit r259862, and attempts to fix builder CMakeCaches.

Will try this again some other time...

Conflicts:

	CMakeLists.txt
	tools/driver/CMakeLists.txt

llvm-svn: 259872
2016-02-05 03:40:37 +00:00
Chris Bieneman 3ab12b144a [CMake] Trying to fix a bot failure I introduced in r259862
CMake caching behavior makes me sad.

llvm-svn: 259864
2016-02-05 01:27:31 +00:00
Chris Bieneman 1681091991 [CMake] Improve the clang order-file generation workflow
Summary:
With this change generating clang order files using dtrace uses the following workflow:

cmake <whatever options you want>

ninja generate-order-file

ninja clang

This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one.

CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file.

Reviewers: bogner

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16896

llvm-svn: 259862
2016-02-05 01:22:03 +00:00
Arpith Chacko Jacob 05bebb578a [OpenMP] Parsing + sema for target parallel for directive.
Summary:
This patch adds parsing + sema for the target parallel for directive along with testcases.

Reviewers: ABataev

Differential Revision: http://reviews.llvm.org/D16759

llvm-svn: 259654
2016-02-03 15:46:42 +00:00
Manman Ren 5b786407d0 Class Property: class property and instance property can have the same name.
Add "enum ObjCPropertyQueryKind" to a few APIs that used to only take the name
of the property: ObjCPropertyDecl::findPropertyDecl,
ObjCContainerDecl::FindPropertyDeclaration,
ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass,
ObjCImplDecl::FindPropertyImplDecl, and Sema::ActOnPropertyImplDecl.

ObjCPropertyQueryKind currently has 3 values:
OBJC_PR_query_unknown, OBJC_PR_query_instance, OBJC_PR_query_class

This extra parameter specifies that we are looking for an instance property with
the given name, or a class property with the given name, or any property with
the given name (if both exist, the instance property will be returned).

rdar://23891898

llvm-svn: 259070
2016-01-28 18:49:28 +00:00
Benjamin Kramer 5e45630edf Update for LLVM change.
llvm-svn: 258918
2016-01-27 10:01:30 +00:00
Chris Bieneman 2bf68c6c1c Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html

    "This is the way [autoconf] ends
    Not with a bang but a whimper."
    -T.S. Eliot

Reviewers: chandlerc, grosbach, bob.wilson, echristo

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D16472

llvm-svn: 258862
2016-01-26 21:30:40 +00:00
Arpith Chacko Jacob e955b3d3fe [OpenMP] Parsing + sema for target parallel directive.
Summary:
This patch adds parsing + sema for the target parallel directive and its clauses along with testcases.

Reviewers: ABataev

Differential Revision: http://reviews.llvm.org/D16553

Rebased to current trunk and updated test cases.

llvm-svn: 258832
2016-01-26 18:48:41 +00:00
Arpith Chacko Jacob 3cf89040b0 [OpenMP] Parsing + sema for defaultmap clause.
Summary:
This patch adds parsing + sema for the defaultmap clause associated with the target directive (among others).

Reviewers: ABataev

Differential Revision: http://reviews.llvm.org/D16527

llvm-svn: 258817
2016-01-26 16:37:23 +00:00
Daniel Jasper 18b1de3ec6 clang-format-diff: Replace hard-code default for clang-format binary with flag.
Patch by Kwasi Mensah, thank you.

llvm-svn: 258328
2016-01-20 18:55:57 +00:00
Aaron Ballman 01dc157ce8 Silencing several -Wcast-qual warnings; NFC.
llvm-svn: 258317
2016-01-20 15:25:30 +00:00
Chris Bieneman b6a296ca62 [CMake] Creating add_clang_tool macro to wrap add_clang_executable and generate install actions and targets.
This change brings forward the LLVM convention that "executables" are just runnable binaries, and "tools" are executables that are part of the project's install.

Having this abstraction will allow us to simplify some of the tool CMakeLists files, and it will standardize some of the install behaviors.

llvm-svn: 258209
2016-01-19 22:41:51 +00:00
Samuel Antao 7259076032 [OpenMP] Parsing + sema for "target exit data" directive.
Patch by Arpith Jacob. Thanks!

llvm-svn: 258177
2016-01-19 20:04:50 +00:00
Samuel Antao df67fc468e [OpenMP] Parsing + sema for "target enter data" directive.
Patch by Arpith Jacob. Thanks!

llvm-svn: 258165
2016-01-19 19:15:56 +00:00
Argyrios Kyrtzidis 785705b399 [libclang] Introduce APIs for evaluating a cursor and checking if a macro is builtin/function.
rdar://24091595

llvm-svn: 257968
2016-01-16 00:20:02 +00:00
Joerg Sonnenberger 9db01aaf78 Avoid self-assignment of SmallString, trigger UB behavior down the road.
llvm-svn: 257947
2016-01-15 22:29:34 +00:00
Carlo Bertolli b4adf55e0f Add OpenMP dist_schedule clause to distribute directive and related regression tests.
llvm-svn: 257917
2016-01-15 18:50:31 +00:00
Chris Bieneman 9c92d67b78 [CMake] Move the install logic for libclang's headers into the libclang CMakelists
This makes it so if you disable building libclang you won't install the headers as part of the 'install' target.

llvm-svn: 257828
2016-01-14 22:48:45 +00:00
Eugene Zelenko a78996e2e6 Install scan-build and scan-view only if Static Analyzer was enabled.
llvm-svn: 257562
2016-01-13 02:03:50 +00:00
Laszlo Nagy bc68758dd5 D9600: Add scan-build python implementation
llvm-svn: 257533
2016-01-12 22:38:41 +00:00
Xiuli Pan 9c14e28211 [OpenCL] Pipe type support
Summary:
Support for OpenCL 2.0 pipe type.
This is a bug-fix version for bader's patch reviews.llvm.org/D14441


Reviewers: pekka.jaaskelainen, Anastasia

Subscribers: bader, Anastasia, cfe-commits

Differential Revision: http://reviews.llvm.org/D15603

llvm-svn: 257254
2016-01-09 12:53:17 +00:00
Sergey Kalinichev b8d516a8d9 [libclang] Handle AutoType in clang_getTypeDeclaration
Differential Revision: http://reviews.llvm.org/D13001

llvm-svn: 257043
2016-01-07 09:20:40 +00:00
Erik Verbruggen 8f9d180f09 Show inclusions from a preamble in clang_getInclusions.
When reparsing a translation unit with preamble generation turned on,
no includes are found. This is due to the fact that all SLocs from
AST/PCH files are skipped as they are 'loaded', and inclusions from a
preamble are also 'loaded'. So, in case a file has a preamble, it first
needs to process those loaded inclusions, and then check for any local
inclusions. This latter one is for any includes that are not part of the
preamble, like includes half-way through a file.

This fixes PR24748.

Differential Revision: http://reviews.llvm.org/D14329

llvm-svn: 256939
2016-01-06 15:12:51 +00:00
James Y Knight 7281c357b1 [TrailingObjects] Convert OffsetOfExpr.
That necessitated moving the OffsetOfNode class out of OffsetOfExpr.

llvm-svn: 256590
2015-12-29 22:31:18 +00:00
Alexander Kornienko 1a9f184734 Refactor: Simplify boolean conditional return statements in tools/libclang
Summary: Use clang-tidy to simplify boolean conditional return statements.

Reviewers: alexfh

Subscribers: alexfh, chfast, cfe-commits

Patch by Richard Thomson!

Differential Revision: http://reviews.llvm.org/D10024

llvm-svn: 256498
2015-12-28 15:24:08 +00:00
James Y Knight 04ec5bfad8 [TrailingObjects] Convert ASTTemplateKWAndArgsInfo and ASTTemplateArgumentListInfo.
Doing so required separating them so that the former doesn't inherit
from the latter anymore. Investigating that, it became clear that the
inheritance wasn't actually providing real value in any case.

So also:
- Remove a bunch of redundant functions (getExplicitTemplateArgs,
  getOptionalExplicitTemplateArgs) on various Expr subclasses which
  depended on the inheritance relationship.
- Switched external callers to use pre-existing accessors that return the
  data they're actually interested in (getTemplateArgs,
  getNumTemplateArgs, etc).
- Switched internal callers to use pre-existing getTemplateKWAndArgsInfo.

llvm-svn: 256359
2015-12-24 02:59:37 +00:00
David Majnemer 2b9349db38 [clang-cl] Add support for /Brepro
The /Brepro flag controls whether or not the compiler should embed
timestamps into the object file.  Object files which do not embed
timestamps are not suitable for incremental linking but are suitable for
hermetic build systems and staged self-hosts of clang.

A normal clang spelling of this flag has been added,
-mincremental-linker-compatible.

llvm-svn: 256204
2015-12-21 22:09:34 +00:00
Alexander Kornienko fbd33be333 [scan-view] replace deprecated optparse with argparse
Summary: scan-view migrated from optparse deprecated Python module to its replacement (argparse) and resolved few conflicts with pep8

Reviewers: ddunbar, aaron.ballman, dcoughlin, jroelofs, zaks.anna

Subscribers: cfe-commits

Patch by Kirill Bobyrev!

Differential Revision: http://reviews.llvm.org/D15370

llvm-svn: 256150
2015-12-21 12:19:13 +00:00
Benjamin Kramer 5c248d89f3 [libclang] Add a flag to create the precompiled preamble on the first parse.
Summary:
The current default is to create the preamble on the first reparse, aka
second parse. This is useful for clients that do not want to block when
opening a file because serializing the preamble takes a bit of time.
However, this makes the reparse much more expensive and that may be on the
critical path as it's the first interaction a user has with the source code.

YouCompleteMe currently optimizes for the first code interaction by parsing
the file twice when loaded. That's just unnecessarily slow and this flag
helps to avoid that.

Reviewers: doug.gregor, klimek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15490

llvm-svn: 255635
2015-12-15 09:30:31 +00:00
Alexey Bataev 28c75417b2 [OPENMP 4.5] Parsing/sema for 'hint' clause of 'critical' directive.
OpenMP 4.5 adds 'hint' clause to critical directive. Patch adds parsing/semantic analysis for this clause.

llvm-svn: 255625
2015-12-15 08:19:24 +00:00
Carlo Bertolli 6200a3d0f3 Add parse and sema of OpenMP distribute directive with all clauses except dist_schedule
llvm-svn: 255498
2015-12-14 14:51:25 +00:00
Saleem Abdulrasool 8aa0b80ec7 libclang: expose dllexport, dllimport attributes
These attributes were previously unexposed.  Expose them through the libclang
interfaces.  Add tests that cover both the MSVC spelling and the GNU spelling.

llvm-svn: 255273
2015-12-10 18:45:18 +00:00
Saleem Abdulrasool d5af8ae17f libclang: correct inverted logic
The complete dtor is only emitted when there is a virtual destructor.  The test
itself was incorrect, so the issue in the code was not noticed.

llvm-svn: 255225
2015-12-10 06:30:23 +00:00
NAKAMURA Takumi 2d5c6ddf74 Revert r255001, "Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule."
It causes memory leak. Some tests in test/OpenMP would fail.

llvm-svn: 255094
2015-12-09 04:35:57 +00:00
Hans Wennborg d0edbdfad1 Update clang-format-vs README
VS2013 is requried after r231084.

llvm-svn: 255029
2015-12-08 17:54:27 +00:00
Alexey Bataev 382967a2e4 [OPENMP 4.5] Parsing/sema for 'num_tasks' clause.
OpenMP 4.5 adds directives 'taskloop' and 'taskloop simd'. These directives support clause 'num_tasks'. Patch adds parsing/semantic analysis for this clause.

llvm-svn: 255008
2015-12-08 12:06:20 +00:00
Carlo Bertolli b9bfa75b28 Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule.
llvm-svn: 255001
2015-12-08 04:21:03 +00:00
Alexey Bataev 1fd4aed26b [OPENMP 4.5] parsing/sema support for 'grainsize' clause.
OpenMP 4.5 adds 'taksloop' and 'taskloop simd' directives, which have 'grainsize' clause. Patch adds parsing/sema analysis of this clause.

llvm-svn: 254903
2015-12-07 12:52:51 +00:00
Alexey Bataev b825de17b7 [OPENMP 4.5] parsing/sema support for 'nogroup' clause.
OpenMP 4.5 adds 'taskloop' and 'taskloop simd' directives. These directives have new 'nogroup' clause. Patch adds basic parsing/sema support for this clause.

llvm-svn: 254899
2015-12-07 10:51:44 +00:00
Alexey Bataev 0a6ed84a0d [OPENMP 4.5] Parsing/sema support for 'omp taskloop simd' directive.
OpenMP 4.5 adds directive 'taskloop simd'. Patch adds parsing/sema analysis for 'taskloop simd' directive and its clauses.

llvm-svn: 254597
2015-12-03 09:40:15 +00:00
Alexey Bataev a056935a2f [OPENMP 4.5] Parsing/sema analysis for 'priority' clause.
OpenMP 4.5 defines new clause 'priority' for 'task', 'taskloop' and 'taskloop simd' directives. Added parsing and sema analysis for 'priority' clause in 'task' and 'taskloop' directives.

llvm-svn: 254398
2015-12-01 10:17:31 +00:00
Alexey Bataev 49f6e78d71 [OPENMP 4.5] Parsing/sema analysis for 'taskloop' directive.
Adds initial parsing and semantic analysis for 'taskloop' directive.

llvm-svn: 254367
2015-12-01 04:18:41 +00:00
Kelvin Li a15fb1a110 [OpenMP] Parsing and sema support for thread_limit clause.
http://reviews.llvm.org/D15029

llvm-svn: 254207
2015-11-27 18:47:36 +00:00
Alexey Bataev f763027f04 [MSVC] 'property' with an empty array in array subscript expression.
MSVC supports 'property' attribute and allows to apply it to the declaration of an empty array in a class or structure definition.
For example:
```
__declspec(property(get=GetX, put=PutX)) int x[];
```
The above statement indicates that x[] can be used with one or more array indices. In this case, i=p->x[a][b] will be turned into i=p->GetX(a, b), and p->x[a][b] = i will be turned into p->PutX(a, b, i);
Differential Revision: http://reviews.llvm.org/D13336

llvm-svn: 254067
2015-11-25 12:01:00 +00:00
Richard Smith a205719319 Teach RAV to pass its DataRecursionQueue to derived classes if they ask for it,
to allow them to explicitly opt into data recursion despite having overridden
Traverse*Stmt or Traverse*Expr. Use this to reintroduce data recursion to the
one place that lost it when DataRecursiveASTVisitor was removed.

llvm-svn: 254041
2015-11-24 23:50:47 +00:00
Kelvin Li 099bb8c65d [OpenMP] Parsing and sema support for num_teams clause
http://reviews.llvm.org/D14802

llvm-svn: 254019
2015-11-24 20:50:12 +00:00
Richard Smith 50668455a7 Remove DataRecursiveASTVisitor; it no longer serves any purpose, since it's just an alias for RecursiveASTVisitor.
llvm-svn: 253949
2015-11-24 03:55:01 +00:00
Ehsan Akhgari 93697fa755 Make clang_Cursor_getMangling not mangle if the declaration isn't mangled
Right now clang_Cursor_getMangling will attempt to mangle any
declaration, even if the declaration isn't mangled (extern C).  This
results in a partially mangled name which isn't useful for much. This
patch makes clang_Cursor_getMangling return an empty string if the
declaration isn't mangled.

Patch by Michael Wu <mwu@mozilla.com>.

llvm-svn: 253909
2015-11-23 19:56:46 +00:00
Daniel Jasper b68aabf7fc clang-format: Make moving of the Cursor work properly when sorting #includes.
llvm-svn: 253860
2015-11-23 08:36:35 +00:00
Kelvin Li 0bff7afab5 [OpenMP] Parsing and sema support for map clause
http://reviews.llvm.org/D14134 

llvm-svn: 253849
2015-11-23 05:32:03 +00:00
Chris Bieneman 0502e98c8a Honor system specific paths of MAN pages
Summary: Caught on NetBSD.

Patch by: Kamil Rytarowski (krytarowski)

Reviewers: beanz, jroelofs

Subscribers: cfe-commits, joerg

Differential Revision: http://reviews.llvm.org/D14800

llvm-svn: 253693
2015-11-20 18:49:02 +00:00
Argyrios Kyrtzidis a3e2ff19e5 [libclang] Make sure to use the raw module format for libclang parsing.
Fixes crash when passing '-gmodules' in the compiler options.
rdar://23588717

llvm-svn: 253645
2015-11-20 03:36:21 +00:00
Benjamin Kramer c02670ed50 [libclang] Add entry points that take a full command line including argv[0].
This provides both a more uniform interface and makes libclang behave like
clang tooling wrt relative paths against argv[0]. This is necessary for
finding paths to a c++ standard library relative to a clang binary given
in a compilation database. It can also be used to find paths relative to
libclang.so if the full path to it is passed in.

Differential Revision: http://reviews.llvm.org/D14695

llvm-svn: 253466
2015-11-18 16:14:27 +00:00
Reid Kleckner 356be39f65 Try to fix leak in CXStringSet from r252853
llvm-svn: 253418
2015-11-18 01:06:39 +00:00
Daniel Jasper da44677082 clang-format: Enable #include sorting by default.
This has seen quite some usage and I am not aware of any issues. Also
add a style option to enable/disable include sorting. The existing
command line flag can from now on be used to override whatever is set
in the style.

llvm-svn: 253202
2015-11-16 12:38:56 +00:00
Sergey Kalinichev 8f3b187e21 [libclang] Visit TypeAliasTemplateDecl
This makes TypeAliasTemplateDecl accessible via LibClang and python bindings

Differential Revision: http://reviews.llvm.org/D13844

llvm-svn: 253166
2015-11-15 13:48:32 +00:00
Sergey Kalinichev c015120b53 [libclang] Expose AutoType
Expose the AutoType via LibClang and python bindings

Differential Revision: http://reviews.llvm.org/D13000

llvm-svn: 253165
2015-11-15 13:10:10 +00:00
Sergey Kalinichev 43ed98b9dd Remove some trailing whitespace
llvm-svn: 253164
2015-11-15 12:37:01 +00:00
Argyrios Kyrtzidis f10158c025 [CMake] Don't install c-index-test when LLVM_INSTALL_TOOLCHAIN_ONLY=ON.
llvm-svn: 253099
2015-11-13 22:41:14 +00:00
Jonathan Roelofs 534c4eec48 Fix build... again
llvm-svn: 253081
2015-11-13 21:04:14 +00:00
Jonathan Roelofs 814aa25a92 [scan-build] Make scan-build work whether it's installed or not
llvm-svn: 253074
2015-11-13 20:34:15 +00:00
Jonathan Roelofs 80df3d262d [scan-build] Move non user-facing utilities to share
llvm-svn: 253068
2015-11-13 19:56:07 +00:00
NAKAMURA Takumi 624922ad87 scan-build: Fix install.
llvm-svn: 253016
2015-11-13 06:48:02 +00:00
Argyrios Kyrtzidis 2cab8eec74 [CMake] If 'INTERNAL_INSTALL_PREFIX' is set, use it for determining the install destination of c-index-test and the libclang headers.
llvm-svn: 253001
2015-11-13 01:46:18 +00:00
Jonathan Roelofs 7c297074d4 Fix build
llvm-svn: 252991
2015-11-13 01:23:40 +00:00