summaryrefslogtreecommitdiffstats
path: root/clang/test/Index
Commit message (Collapse)AuthorAgeFilesLines
...
* [index] Include parameter types in the USRs for C functions marked with ↵Argyrios Kyrtzidis2016-03-041-0/+5
| | | | | | 'overloadable' attribute. llvm-svn: 262694
* [index] In ObjC++ handle objc type parameters for function USRs.Argyrios Kyrtzidis2016-03-041-0/+11
| | | | llvm-svn: 262693
* [index] Ignore ObjCTypeParamDecls during indexing.Argyrios Kyrtzidis2016-03-041-0/+5
| | | | llvm-svn: 262686
* [index] Report references of ObjC super class/protocols in interfaces and ↵Argyrios Kyrtzidis2016-03-031-0/+20
| | | | | | protocols. llvm-svn: 262584
* [test] Re-enable asan on the test, stack usage should be lower.Argyrios Kyrtzidis2016-03-031-2/+2
| | | | llvm-svn: 262583
* Fix test breakage on windows where the default std is c++11 by forcing c++03 ↵Manuel Klimek2016-03-011-1/+1
| | | | | | in the test. llvm-svn: 262325
* Optionally demote fatal errors to non-fatal errors.Manuel Klimek2016-03-011-0/+29
| | | | | | | | | | | | | | | | | | 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
* [test] After r262290 reducing stack usage, try re-enabling asan on the ↵Argyrios Kyrtzidis2016-03-011-2/+2
| | | | | | related test. llvm-svn: 262295
* [index] Print and test module import references.Argyrios Kyrtzidis2016-02-293-0/+15
| | | | llvm-svn: 262208
* [index] Add a caller relation for a call reference.Argyrios Kyrtzidis2016-02-291-2/+4
| | | | llvm-svn: 262207
* [AST/RecursiveASTVisitor] Correction so that dataTraverseStmtPost will get ↵Argyrios Kyrtzidis2016-02-291-0/+10
| | | | | | | | called after the statement has been visited. Fixes the indexing client of this. llvm-svn: 262206
* [index] Use ',' to separate symbol roles when printing.Argyrios Kyrtzidis2016-02-292-2/+2
| | | | llvm-svn: 262205
* [AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in ↵Argyrios Kyrtzidis2016-02-151-0/+9
| | | | | | | | | | 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
* [test/Index] Set a specific target for the test.Argyrios Kyrtzidis2016-02-141-1/+1
| | | | llvm-svn: 260861
* [index] Factor libclang's functionality to determing the mangled name of ↵Argyrios Kyrtzidis2016-02-141-2/+2
| | | | | | symbols into the clangIndex library. llvm-svn: 260858
* [index] Enhance c-index-test tool and have it link and test the clangIndex ↵Argyrios Kyrtzidis2016-02-141-0/+8
| | | | | | library directly. llvm-svn: 260842
* Disable two tests that use a lot of stack under ASan.Alexey Samsonov2016-02-132-4/+4
| | | | llvm-svn: 260779
* [Modules] Don't infinite recurse on implicit import of circular modules in ↵Ben Langmuir2016-02-116-0/+30
| | | | | | | | | | | | | | preamble Update the Preprocessor's VisibleModuleSet when typo-correction creates an implicit module import so that we won't accidentally write an invalid SourceLocation into the preamble AST. This would later lead to infinite recursion when loading the preamble AST because we use the value in ImportLocs to prevent visiting a module twice. rdar://problem/24440990 llvm-svn: 260543
* clang/test/Index/skip-parsed-bodies/compile_commands.json: Appease targeting ↵NAKAMURA Takumi2016-02-101-3/+3
| | | | | | msvc. llvm-svn: 260347
* libclang: Enable skip-parsed-bodies on win32.NAKAMURA Takumi2016-02-101-1/+0
| | | | | | I guess it would be working since Rafael's r187619. llvm-svn: 260344
* [libclang] indexing: make sure to not visit init-list expressions twice.Argyrios Kyrtzidis2016-02-091-0/+8
| | | | llvm-svn: 260255
* Index: provide adjustment thunk information for C++ manglingsSaleem Abdulrasool2016-02-061-0/+30
| | | | | | | Add support for exposing the adjustment thunk for virtual methods as appropriate. llvm-svn: 260011
* [libclang] Introduce APIs for evaluating a cursor and checking if a macro is ↵Argyrios Kyrtzidis2016-01-161-0/+30
| | | | | | | | builtin/function. rdar://24091595 llvm-svn: 257968
* [libclang] Handle AutoType in clang_getTypeDeclarationSergey Kalinichev2016-01-071-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D13001 llvm-svn: 257043
* Show inclusions from a preamble in clang_getInclusions.Erik Verbruggen2016-01-061-0/+11
| | | | | | | | | | | | | | | | 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
* [libclang] Add a flag to create the precompiled preamble on the first parse.Benjamin Kramer2015-12-151-2/+11
| | | | | | | | | | | | | | | | | | | | | 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
* Preserve source location information for qualified names used in a constructorRichard Smith2015-12-121-0/+10
| | | | | | initializer list to name a base class. Patch by Shahms King! llvm-svn: 255420
* libclang: expose dllexport, dllimport attributesSaleem Abdulrasool2015-12-102-0/+66
| | | | | | | 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
* libclang: correct inverted logicSaleem Abdulrasool2015-12-101-6/+6
| | | | | | | 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
* Make clang_Cursor_getMangling not mangle if the declaration isn't mangledEhsan Akhgari2015-11-231-0/+7
| | | | | | | | | | | | 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
* [libclang] Make sure to use the raw module format for libclang parsing.Argyrios Kyrtzidis2015-11-203-0/+5
| | | | | | | Fixes crash when passing '-gmodules' in the compiler options. rdar://23588717 llvm-svn: 253645
* [libclang] Visit TypeAliasTemplateDeclSergey Kalinichev2015-11-152-1/+8
| | | | | | | | This makes TypeAliasTemplateDecl accessible via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13844 llvm-svn: 253166
* [libclang] Expose AutoTypeSergey Kalinichev2015-11-151-5/+5
| | | | | | | | Expose the AutoType via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13000 llvm-svn: 253165
* [modules] Allow "redefinition" of typedef of anon tag from unimported submoduleBen Langmuir2015-11-141-1/+1
| | | | | | | | | r233345 started being stricter about typedef names for linkage purposes in non-visible modules, but broke languages without the ODR. rdar://23527954 llvm-svn: 253123
* [modules] Follow the C++ standard's rule for linkage of enumerators: they haveRichard Smith2015-11-131-1/+1
| | | | | | | | | the linkage of the enumeration. For enumerators of unnamed enumerations, extend the -Wmodules-ambiguous-internal-linkage extension to allow selecting an arbitrary enumerator (but only if they all have the same value, otherwise it's ambiguous). llvm-svn: 253010
* [modules] Simplify and generalize the existing rule for finding hiddenRichard Smith2015-11-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | declarations in redeclaration lookup. A declaration is now visible to lookup if: * It is visible (not in a module, or in an imported module), or * We're doing redeclaration lookup and it's externally-visible, or * We're doing typo correction and looking for unimported decls. We now support multiple modules having different internal-linkage or no-linkage definitions of the same name for all entities, not just for functions, variables, and some typedefs. As previously, if multiple such entities are visible, any attempt to use them will result in an ambiguity error. This patch fixes the linkage calculation for a number of entities where we previously didn't need to get it right (using-declarations, namespace aliases, and so on). It also classifies enumerators as always having no linkage, which is a slight deviation from the C++ standard's definition, but not an observable change outside modules (this change is being discussed on the -core reflector currently). This also removes the prior special case for tag lookup, which made some cases of this work, but also led to bizarre, bogus "must use 'struct' to refer to type 'Foo' in this scope" diagnostics in C++. llvm-svn: 252960
* libclang: add clang_Cursor_getCXXManglingsSaleem Abdulrasool2015-11-121-0/+66
| | | | | | | | | This function permits the mangling of a C++ 'structor. Depending on the ABI and the declaration, the declaration may contain more than one associated symbol for a given declaration. This allows the consumer to retrieve all of the associated symbols for the declaration the cursor points to. llvm-svn: 252853
* Stop back-patching 'readonly' Objective-C properties with 'readwrite' ones.Douglas Gregor2015-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A 'readonly' Objective-C property declared in the primary class can effectively be shadowed by a 'readwrite' property declared within an extension of that class, so long as the types and attributes of the two property declarations are compatible. Previously, this functionality was implemented by back-patching the original 'readonly' property to make it 'readwrite', destroying source information and causing some hideously redundant, incorrect code. Simplify the implementation to express how this should actually be modeled: as a separate property declaration in the extension that shadows (via the name lookup rules) the declaration in the primary class. While here, correct some broken Fix-Its, eliminate a pile of redundant code, clean up the ARC migrator's handling of properties declared in extensions, and fix debug info's naming of methods that come from categories. A wonderous side effect of doing this write is that it eliminates the "AddedObjCPropertyInClassExtension" method from the AST mutation listener, which in turn eliminates the last place where we rewrite entire declarations in a chained PCH file or a module file. This change (which fixes rdar://problem/18475765) will allow us to eliminate the rewritten-decls logic from the serialization library, and fixes a crash (rdar://problem/23247794) illustrated by the test/PCH/chain-categories.m example. llvm-svn: 251874
* Suppress uninteresting output from crash-recovery-modules.mNico Weber2015-10-291-4/+4
| | | | | | No behavior change, but it makes this test a bit easier to debug when it fails. llvm-svn: 251650
* Index: expose is_mutable_fieldSaleem Abdulrasool2015-10-271-0/+6
| | | | | | | | Expose isMutable via libClang and python bindings. Patch by Jonathan B Coe! llvm-svn: 251410
* Define weak and __weak to mean ARC-style weak references, even in MRC.John McCall2015-10-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, __weak was silently accepted and ignored in MRC mode. That makes this a potentially source-breaking change that we have to roll out cautiously. Accordingly, for the time being, actual support for __weak references in MRC is experimental, and the compiler will reject attempts to actually form such references. The intent is to eventually enable the feature by default in all non-GC modes. (It is, of course, incompatible with ObjC GC's interpretation of __weak.) If you like, you can enable this feature with -Xclang -fobjc-weak but like any -Xclang option, this option may be removed at any point, e.g. if/when it is eventually enabled by default. This patch also enables the use of the ARC __unsafe_unretained qualifier in MRC. Unlike __weak, this is being enabled immediately. Since variables are essentially __unsafe_unretained by default in MRC, the only practical uses are (1) communication and (2) changing the default behavior of by-value block capture. As an implementation matter, this means that the ObjC ownership qualifiers may appear in any ObjC language mode, and so this patch removes a number of checks for getLangOpts().ObjCAutoRefCount that were guarding the processing of these qualifiers. I don't expect this to be a significant drain on performance; it may even be faster to just check for these qualifiers directly on a type (since it's probably in a register anyway) than to do N dependent loads to grab the LangOptions. rdar://9674298 llvm-svn: 251041
* Make clang_Cursor_getMangling not mangle if the declaration isn't mangledEhsan Akhgari2015-10-081-0/+5
| | | | | | | | | | | | 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: 249639
* Revert r249437Ehsan Akhgari2015-10-061-5/+0
| | | | llvm-svn: 249440
* Make clang_Cursor_getMangling don't mangle if the declaration isn't mangledEhsan Akhgari2015-10-061-0/+5
| | | | | | | | | | | | 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: 249437
* Fix printing of parameterized Objective-C interfaces.Bob Wilson2015-10-011-0/+5
| | | | | | This change was accidentally omitted from Doug's change in r241541. llvm-svn: 248975
* Relax test to allow for __attribute__((thiscall)). Under Win32 c-index-test ↵Yaron Keren2015-09-251-2/+2
| | | | | | | | | output is CXXMethod=foo:4:7 (unavailable) [type=int () __attribute__((thiscall))] [typekind=FunctionProto] [resulttype=int] [resulttypekind=Int] [isPOD=0] CXXConstructor=Foo:5:3 (unavailable) [type=void () __attribute__((thiscall))] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0] llvm-svn: 248626
* Fix bug on reporting availability of deleted methods in libclang.Manuel Klimek2015-09-251-0/+13
| | | | | | Patch by Sergey Kalinichev. llvm-svn: 248596
* Improve the printing of ranges when macros are involved.Richard Trieu2015-09-241-4/+0
| | | | | | | | | | | | Trace the ranges through the macro backtrace better. This allows better range highlighting through all levels of the macro bracktrace. Also some improvements to backtrace printer for omitting different backtraces. Patch by Zhengkai Wu. Differential Revision: http://reviews.llvm.org/D12379 llvm-svn: 248454
* [sema] Fix assertion hit when using libclang to index a particular C++ ↵Argyrios Kyrtzidis2015-09-111-0/+10
| | | | | | | | snippet involving templates. Assertion hit was in ClassTemplateSpecializationDecl::getSourceRange(). llvm-svn: 247373
* Index: expose visibility attributeSaleem Abdulrasool2015-09-051-0/+13
| | | | | | | Expose the previously unexposed visibility attribute via the python and C bindings. llvm-svn: 246931
OpenPOWER on IntegriCloud