summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a leak in tools/driver/cc1as_main.cppKostya Serebryany2017-04-191-2/+2
| | | | | | | | | | | | | | Summary: For some reason, the asan bot has recently started reporting this leak even though it existed for ages. Reviewers: pcc Reviewed By: pcc Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D32243 llvm-svn: 300755
* clang-format-vs licence.txt: drop svn:executableHans Wennborg2017-04-131-0/+0
| | | | | | Not sure how it ended up with that property in the first place. llvm-svn: 300245
* Follow-up to r300225: update ClangFormat.csproj tooHans Wennborg2017-04-131-1/+1
| | | | llvm-svn: 300231
* Follow-up to r300225: update ClangFormat.sln to VS2017Hans Wennborg2017-04-131-2/+2
| | | | | | This got lost in the previous patch somehow. llvm-svn: 300226
* Warning-free clang-format plugin install for VS 15.0Hans Wennborg2017-04-133-81/+24
| | | | | | | | | | | | | | | | | | | | With the new release of VS, it's required that all plugins migrate to the new VSIX manifest format. The new format is backwards compatible with all versions newer that Visual Studio 2012, so this migration effectively drops support for older versions of the IDE. It's also required that these new extensions are built with Visual Studio 2017, so unfortunately it was necessary to migrate the project and solution. Also removed COM references to EnvDTE and Microsoft.VisualStudio.TextManager.Interop from the csproj, as they seem to both be unnecessary and would trigger build warnings because of changes to GAC. Patch by Hugo Puhlmann! Differential Revision: https://reviews.llvm.org/D31740 llvm-svn: 300225
* clang-format-vs: Use a separate license.txt copyHans Wennborg2017-04-133-7/+40
| | | | | | | The regular file used to display very poorly in the VSIX installer due to long lines, wrapping etc. llvm-svn: 300223
* [Driver] Add compiler option to generate a reproducerBruno Cardoso Lopes2017-04-121-2/+3
| | | | | | | | | | | | | | | | | | | | | One way to currently test the reproducers is to setup "FORCE_CLANG_DIAGNOSTICS_CRASH=1" before invoking clang. This simulates a crash and produces the same contents needed by the reproducers. The reproducers are specially useful when triaging Modules issues, not only on crashes, but also for reproducing misleading warnings, errors, etc. Add a '-gen-reproducer' driver option to clang (or any similar name) and give users a flag option. Note that clang already has a -fno-crash-diagnostics, which disables the crash reproducers. I've decided not to propose "-fcrash-diagnostics" since it doesn't convey the ideia of reproduction despite a crash. rdar://problem/24114619 Differential Revision: https://reviews.llvm.org/D27604 llvm-svn: 300109
* [clang-import-test] Lookup inside contextsSean Callanan2017-04-111-52/+12
| | | | | | | | | | | | | | | | | | | clang-import-test has until now been only able to report top-level Decls. This is clearly insufficient; we should be able to look inside structs and namespaces also. This patch adds new test cases for a variety of lookups inside existing ASTContexts, and adds the functionality necessar to make most of these testcases work. (One testcase is known to fail because of ASTImporter limitations when importing templates; I'll look into that separately.) This patch also separates the core functionality out into ExternalASTMerger, an interface that allows clients like LLDB to make use of it. clang-import-test now only has the machinery necessary to set up the tests. Differential revision: https://reviews.llvm.org/D30435 llvm-svn: 299976
* [scan-build-py] merge runner module to analyzerLaszlo Nagy2017-04-076-625/+600
| | | | | | Differential Revision: https://reviews.llvm.org/D31237 llvm-svn: 299759
* clang-format-vsix: Add "Format on Save" featureAntonio Maiorano2017-04-054-90/+279
| | | | | | | | | | | This change adds a feature to the clang-format VS extension that optionally enables the automatic formatting of documents when saving. Since developers always need to save their files, this eases the workflow of making sure source files are properly formatted. Differential Revision: https://reviews.llvm.org/D29221 llvm-svn: 299543
* clang-format vs plugin support for Visual Studio 2017Hans Wennborg2017-03-311-0/+3
| | | | | | | | | | | | | | | | | | | | With the release of Visual Studio 2017, we need to at the very least claim support for it in the current manifest file. With the changes introducted in this patch we can install the extension again, but a warning message will be shown stating that it's not supported (https://twitter.com/parsley72/status/846558416751411200). To get the rid of the warning more work is necessary, as VS 2017 changed some things about extensions, see more here: https://docs.microsoft.com/en-us/visualstudio/extensibility/how-to-migrate-extensibility-projects-to-visual-studio-2017. While working on those changes, it has been suggested in the mail list that this first patch is integrated in the meantime. Patch by Hugo Puhlmann! Differential Revision: https://reviews.llvm.org/D31522 llvm-svn: 299210
* Spelling mistakes in comments. NFCI. (PR27635)Simon Pilgrim2017-03-301-1/+1
| | | | llvm-svn: 299083
* [libclang] Bury dead TemporaryFilesKrasimir Georgiev2017-03-241-6/+0
| | | | | | | | | | | | | | | | Summary: AllocatedCXCodeCompleteResults::TemporaryFiles have turned into zombies. Seven years ago they used to do their job during [[ https://github.com/llvm-mirror/clang/commit/313e26c4e81f0e467490a530548450f4c824a6c4/tools/CIndex/CIndexCodeCompletion.cpp#diff-02d3e692ad507b10af9458b775c5750bL261 | file remapping]], but now they are created just to be torn down in the destructor. Reviewers: bkramer Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31288 llvm-svn: 298697
* Actually install scan-build / ccc-analyzer / c++-analyzer on windowsJonathan Roelofs2017-03-221-0/+3
| | | | | | Before, we were only installing the wrappers... oops. llvm-svn: 298549
* Apply clang-tidy's performance-unnecessary-value-param to parts of clang.Benjamin Kramer2017-03-211-1/+2
| | | | | | No functionality change intended. llvm-svn: 298443
* [c-index-test] Fix memory leak in c-index-test tool.Argyrios Kyrtzidis2017-03-211-0/+1
| | | | llvm-svn: 298441
* [index/AST] Determine if a typedef shares a name and spelling location with ↵Argyrios Kyrtzidis2017-03-213-0/+19
| | | | | | | | | | its underlying tag type In such a case, as when using the NS_ENUM macro, for indexing purposes treat the typedef as 'transparent', meaning we treat its references as symbols of the underlying tag symbol. Also provide a libclang API to check for such typedefs. llvm-svn: 298392
* [scan-build-py] reuse command line output parameter for report directoryLaszlo Nagy2017-03-212-28/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D30861 llvm-svn: 298355
* [scan-build-py] use python tempfile for tempdirLaszlo Nagy2017-03-203-10/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D30862 llvm-svn: 298238
* Create msbuild only when using MSVCReid Kleckner2017-03-161-1/+1
| | | | | | | | | | | | | | | | Patch by: Mateusz Mikula Reviewers: rnk Reviewed By: rnk Subscribers: asl, mgorny, cfe-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D29772 llvm-svn: 297998
* Add -cc1 flag -ast-dump-all to perform an AST dump including entities that ↵Richard Smith2017-03-091-0/+1
| | | | | | haven't yet been deserialized. llvm-svn: 297412
* [scan-build-py] move argument parsing into separate moduleLaszlo Nagy2017-03-081-0/+430
| | | | | | Forgot to add the new module. llvm-svn: 297308
* [scan-build-py] move argument parsing into separate moduleLaszlo Nagy2017-03-085-406/+55
| | | | | | Differential Revision: https://reviews.llvm.org/D30601 llvm-svn: 297307
* [scan-build-py] fix some line separator issuesLaszlo Nagy2017-03-082-6/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D30600 llvm-svn: 297266
* [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.Eric Fiselier2017-03-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The changes contained in this patch are: 1. Defines a new AST node `CoawaitDependentExpr` for representing co_await expressions while the promise type is still dependent. 2. Correctly detect and transform the 'co_await' operand to `p.await_transform(<expr>)` when possible. 3. Change the initial/final suspend points to build during the initial parse, so they have the correct operator co_await lookup results. 4. Fix transformation of the CoroutineBodyStmt so that it doesn't re-build the final/initial suspends. @rsmith: This change is a little big, but it's not trivial for me to split it up. Please let me know if you would prefer this submitted as multiple patches. Reviewers: rsmith, GorNishanov Reviewed By: rsmith Subscribers: ABataev, rsmith, mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D26057 llvm-svn: 297093
* [scan-build-py] create decorator for compiler wrapper methodsLaszlo Nagy2017-03-047-114/+208
| | | | | | Differential Revision: https://reviews.llvm.org/D29260 llvm-svn: 296937
* Add coding and shebang.Vassil Vassilev2017-03-022-0/+6
| | | | | | Reviewed by Artem Dergachev (D26030)! llvm-svn: 296781
* clang-format: Don't leave behind temp files in -i mode on Windows, PR26125, ↵Nico Weber2017-02-271-4/+9
| | | | | | | | | | | | | | | | | | reloaded Second attempt after http://llvm.org/viewvc/llvm-project?rev=296166&view=rev In the first attempt, Code (the memory buffer backing the input file) was reset before overwriteChangedFiles() was called, but overwriteChangedFiles() still reads from it. This time, load the whole input file into memory instead of using mmap when formatting in-place. (Since the test is identical to what was in the repo before chapuni's revert, svn diff doesn't show it – see the above link for the test.) https://reviews.llvm.org/D30385 llvm-svn: 296408
* [index] Add 'Parameter' symbol kind and 'Local' symbol property to ↵Argyrios Kyrtzidis2017-02-262-2/+8
| | | | | | | | | | | | distinguish function-local symbols Parameters have a 'child' relation to their function/method. Also add an option '-include-locals' to 'c-index-test core' to enable indexing of function-local symbols. Original patch from Nathan Hawes with some changes by me. https://reviews.llvm.org/D30304 llvm-svn: 296282
* Revert r296166, "clang-format: Don't leave behind temp files in -i mode on ↵NAKAMURA Takumi2017-02-251-1/+0
| | | | | | | | | | | | | | | | | | | | | Windows, PR26125", and r296171. (MemoryBuffer)Code.reset() was too early. ==26912== Invalid read of size 1 ==26912== at 0x437E1D: llvm::MemoryBuffer::init(char const*, char const*, bool) (MemoryBuffer.cpp:47) ==26912== by 0x438013: (anonymous namespace)::MemoryBufferMem::MemoryBufferMem(llvm::StringRef, bool) (MemoryBuffer.cpp:86) ==26912== by 0x438128: llvm::MemoryBuffer::getMemBuffer(llvm::StringRef, llvm::StringRef, bool) (MemoryBuffer.cpp:112) ==26912== by 0x4E189D: clang::vfs::detail::(anonymous namespace)::InMemoryFileAdaptor::getBuffer(llvm::Twine const&, long, bool, bool) (VirtualFileSystem.cpp:443) ==26912== by 0x4DF5BA: clang::vfs::FileSystem::getBufferForFile(llvm::Twine const&, long, bool, bool) (VirtualFileSystem.cpp:94) ==26912== by 0x4B72EC: clang::FileManager::getBufferForFile(clang::FileEntry const*, bool, bool) (FileManager.cpp:443) ==26912== by 0x4C1F81: clang::SrcMgr::ContentCache::getBuffer(clang::DiagnosticsEngine&, clang::SourceManager const&, clang::SourceLocation, bool*) const (SourceManager.cpp:98) ==26912== by 0x4C50E5: clang::SourceManager::getBufferData(clang::FileID, bool*) const (SourceManager.cpp:689) ==26912== by 0x58E794: clang::Rewriter::getEditBuffer(clang::FileID) (Rewriter.cpp:230) ==26912== by 0x407297: clang::format::format(llvm::StringRef) (ClangFormat.cpp:311) ==26912== by 0x4078D7: main (ClangFormat.cpp:363) llvm-svn: 296237
* clang-format: Don't leave behind temp files in -i mode on Windows, PR26125Nico Weber2017-02-241-0/+1
| | | | | | Fix and analysis by Wei Mao <weimao1@gmail.com> (see bug), test by me. llvm-svn: 296166
* [c-index-test] For the 'core' invocation, avoid running it under a new thread.Argyrios Kyrtzidis2017-02-231-3/+3
| | | | | | It's unnecessary. llvm-svn: 295934
* Cleanup: use range-based for rather than separate calls to begin and end.Richard Smith2017-02-181-6/+4
| | | | llvm-svn: 295524
* Add an explicit derived class of FunctionDecl to model deduction guides ratherRichard Smith2017-02-171-0/+1
| | | | | | | | than just treating them as FunctionDecls with a funny name. No functionality change intended. llvm-svn: 295491
* [OpenCL] Correct ndrange_t implementationAnastasia Stulova2017-02-161-1/+0
| | | | | | | | | | | | | | | Removed ndrange_t as Clang builtin type and added as a struct type in the OpenCL header. Use type name to do the Sema checking in enqueue_kernel and modify IR generation accordingly. Review: D28058 Patch by Dmitry Borisenkov! llvm-svn: 295311
* Fix the static build.Rafael Espindola2017-02-151-0/+1
| | | | llvm-svn: 295245
* [scan-build-py] move function report_directory from report module to analyze ↵Laszlo Nagy2017-02-144-54/+53
| | | | | | | | module Differential Revision: https://reviews.llvm.org/D29255 llvm-svn: 295045
* [scan-build-py] use subprocess wrapper to execute buildLaszlo Nagy2017-02-143-8/+18
| | | | llvm-svn: 295043
* [libclang] [OpenCL] Expose half type.Joey Gouly2017-02-101-0/+2
| | | | | | | | | | | | | | | | Expose the half type (fp16) through libclang and the python bindings. It seems CXType_LastBuiltin was not updated in b2ea6d9 ("Enable support for __float128 in Clang", 2016-04-13), so update it now. Add an Index test for OpenCL types; in the future we will add other OpenCL types such as images to this test. Patch by Sven van Haastregt. Differential Revision: https://reviews.llvm.org/D29718 llvm-svn: 294754
* P0091R3: Implement basic parsing support for C++17 deduction-guides.Richard Smith2017-02-071-1/+2
| | | | | | | | | | | We model deduction-guides as functions with a new kind of name that identifies the template whose deduction they guide; the bulk of this patch is adding the new name kind. This gives us a clean way to attach an extensible list of guides to a class template in a way that doesn't require any special handling in AST files etc (and we're going to need these functions we come to performing deduction). llvm-svn: 294266
* [c-index-test] CMake: add missing reference to clangSerialization library.Argyrios Kyrtzidis2017-01-301-0/+1
| | | | llvm-svn: 293466
* [c-index-test] Provide capability to index module file imports and dump ↵Argyrios Kyrtzidis2017-01-301-3/+32
| | | | | | | | their input files. This ensures the capability to index a module file using an existing ASTReader from a compiler instance or ASTUnit. llvm-svn: 293461
* [scan-build-py] remove not used flagLaszlo Nagy2017-01-291-12/+2
| | | | llvm-svn: 293418
* [c-index-test] Provide capability for 'c-index-test core' to dump symbol ↵Argyrios Kyrtzidis2017-01-292-0/+46
| | | | | | information from a PCH/module file. llvm-svn: 293416
* [scan-build-py] remove batch filesLaszlo Nagy2017-01-287-7/+0
| | | | llvm-svn: 293397
* [scan-build-py] use subprocess wrapperLaszlo Nagy2017-01-286-92/+89
| | | | llvm-svn: 293396
* Avoid calling dump() in normal codeMatthias Braun2017-01-281-1/+4
| | | | | | | dump() is only available in debug builds and meant for debugger usage, normal code should use something like print(errs()); llvm-svn: 293364
* clang-format: [JS] do not format MPEG transport streams.Martin Probst2017-01-271-0/+1
| | | | | | | | | | | | | | | Summary: The MPEG transport stream file format also uses ".ts" as its file extension. This change detects its specific framing format (0x47 every 189 bytes) and simply ignores MPEG TS files. Reviewers: djasper, sammccall Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D29186 llvm-svn: 293270
* PR0091R3: Implement parsing support for using templates as types.Richard Smith2017-01-262-1/+11
| | | | | | | | | | | | | | | This change adds a new type node, DeducedTemplateSpecializationType, to represent a type template name that has been used as a type. This is modeled around AutoType, and shares a common base class for representing a deduced placeholder type. We allow deduced class template types in a few more places than the standard does: in conditions and for-range-declarators, and in new-type-ids. This is consistent with GCC and with discussion on the core reflector. This patch does not yet support deduced class template types being named in typename specifiers. llvm-svn: 293207
* [index] When indexing an ObjC method declaration use its base name for the ↵Argyrios Kyrtzidis2017-01-262-4/+5
| | | | | | | | | location. Instead of using the location of the beginning '-'/'+'. This is consistent with location used for function decls and ObjC method calls where we use the base name as the location as well. llvm-svn: 293134
OpenPOWER on IntegriCloud