summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
* [leaks] Parse the schema file every time we try to verify the XML. Yes,Chandler Carruth2014-05-021-29/+16
| | | | | | | | | | | | this is wasteful, blah blah, but this is a test utility only. It turns out that without doing this, libxml2 will always leak a bunch of the XML data, and that is causing failures with LSan. This is also quite a bit simpler and I don't think it is slow enough to really be a show stopper. If someone yells about the runtime of c-index-test, we can do other things to try to mitigate it, but the current strategy wasn't working well. llvm-svn: 207882
* [libclang] Add attribute support for 'pure', 'const' and 'noduplicate'.Joey Gouly2014-05-012-0/+9
| | | | | | This bumps CINDEX_VERSION_MINOR up (to 26). llvm-svn: 207767
* scan-build: Don't use realpath when the user provides an explicit path.Jordan Rose2014-04-291-1/+1
| | | | | | PR19583 llvm-svn: 207484
* Follow-up to r207071: Let newFrontendActionFactory() return a unique_ptr.Nico Weber2014-04-281-2/+2
| | | | | | This exposed a leak, fix that. llvm-svn: 207396
* libclang: split out the documentation comment APIAlp Toker2014-04-284-12/+16
| | | | | | | | | | | | | | | | | It's possible that the "comment AST" may be replaced or split out in the midterm, any anyway this makes the headers easier to read. Developers don't currently need to include "clang-c/Documentation.h" explicitly and there's no macro to test for availability yet. The raw comment and brief comment accessors have been kept in Index.h though brief support may also move here as a separate proposal. This is not a deprecation, just a gentle separation of concerns as we look to simplify the built-in representation of comment nodes and support external comment processors. llvm-svn: 207392
* c-arcmt-test/Makefile: Update USEDLIBS for -static.NAKAMURA Takumi2014-04-271-1/+4
| | | | llvm-svn: 207340
* libclang: remove 'CXDiagnostic_Remark'Alp Toker2014-04-264-4/+4
| | | | | | | | | | | | | | | | The change was landed without review or test cases. It trivially broke almost any stable application checking for Severity >= CXDiagnostic_Error or indeed any other kind of severity comparison upon encountering a 'remark'. Mapped to CXDiagnostic_Warning until a workable solution is proposed to the list that preserves API stability. (It's also not clear why the rest of r202475 wasn't simply implemented as a modifier to the existing 'warning' level.) llvm-svn: 207319
* Simplify leak fix of r207076, by just disposing the previous CXString.Argyrios Kyrtzidis2014-04-241-9/+2
| | | | llvm-svn: 207081
* Fix two leaks found by LSan.Nico Weber2014-04-241-1/+11
| | | | | | | | A CursorPlatformAvailability can have several "unavailable" attributes, don't leak all but the first. I'm not sure if there can be several "deprecate"ds too, but add the same logic there to keep the two code paths looking the same. llvm-svn: 207076
* Fix two leaks in c-index-test found by LSan.Nico Weber2014-04-241-6/+14
| | | | | | The result of clang_getCursorSpelling() needs to be clang_getCursorSpelling()ed. llvm-svn: 207073
* Update Target::createMCAsmParser calls for the LLVM interface change.Evgeniy Stepanov2014-04-231-1/+5
| | | | | | Patch by Yuri Gorshenin. llvm-svn: 206970
* Attempt to fix null ASTContext in ASTUnit error pathBen Langmuir2014-04-221-1/+1
| | | | | | | | | We don't need the ASTContext for the diagnostics, only the language options, which we can get from the compiler invocation. It worries me how many categorically different states the ASTUnit class can be in depending on how it is being constructed/used. llvm-svn: 206909
* [OPENMP] parsing 'linear' clause (for directive 'omp simd')Alexander Musman2014-04-221-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D3272 llvm-svn: 206891
* Handle possible trailing '/' in xcode-select output. Patch by Jeff Olson.Ted Kremenek2014-04-211-1/+1
| | | | llvm-svn: 206752
* CodeGen: Use LLVM's InstrProfReader in -fprofile-instr-use=Justin Bogner2014-04-182-1/+2
| | | | | | | | | Update clang to use the InstrProfReader from LLVM to read instrumentation based profile data. This also switches us from the naive text format to the binary format, since that's what's implemented in the reader. llvm-svn: 206658
* clang-format.py: Don't omit the first two words from error messages.Nico Weber2014-04-171-6/+1
| | | | | | | | This reverts r172072. clang-format used to use DiagnosticEngine to output errors: http://llvm.org/viewvc/llvm-project?view=revision&revision=172071. Now it doesn't, so this code is obsolete. llvm-svn: 206479
* When writing YAML in libclang, use yaml::escape instead of write_escapedBen Langmuir2014-04-171-4/+4
| | | | | | | | The YAMLParser has its own escaped string representation, and does not handle octal escape sequences. When writing the virtual file system to a YAML file, use yaml::escape(). llvm-svn: 206443
* Honour -ivfsoverlay in ASTUnit to match clangBen Langmuir2014-04-152-19/+17
| | | | | | | This allows code indexing, etc. to use the VFS in the same way as the compiler. llvm-svn: 206309
* Replace llvm::array_endof with C++11's std::end.Benjamin Kramer2014-04-121-2/+2
| | | | | | No functionality change. llvm-svn: 206111
* Make c-index-test -test-print-type include pointeekind for pointer typesAnders Waldenborg2014-04-091-0/+7
| | | | | | | | | The idea is to give visibility to more type kinds, especially for getting a better grasp of what appears as unexposed type kind with libclang. Differential Revision: http://reviews.llvm.org/D3325 llvm-svn: 205921
* clang-format: Add proto files and JavaScript to git-clang-format.Daniel Jasper2014-04-091-0/+3
| | | | llvm-svn: 205842
* libclang: add clang_CXXMethod_isConst API that allows to determine if a C++Dmitri Gribenko2014-04-073-0/+13
| | | | | | | | member function or member function template is declared 'const' Patch by Kevin Funk with testcase updates by me. llvm-svn: 205714
* Comment necessity of early initializationDavid Blaikie2014-03-311-3/+5
| | | | | | | | | | | | Code review feedback from Eric Christopher on r204261. I didn't want to go into too much detail (the revision history should provide the full stuff) - but I can add more if that's preferred. Also moved this up to right by the construction of the MCAsmInfo so there's less chance that other things might sneak in in between. llvm-svn: 205267
* DebugInfo compression: Enable compression before any sections are created.David Blaikie2014-03-311-2/+4
| | | | | | | | | | | | | | | | | | | | For those playing at home this produced some fairly subtle behavior. The sections created in InitMCObjectFileInfo were created without compressed debug info (a mistake, but not necessarily /broken). Since these sections were almost always referenced by the existing MCSection object, this almost worked. This got weird when we got to handling the relocations for a section. See ELFObjectWriter::WriteSection where we compute the true section for a relocation section by simply stripping the ".rela" prefix and then looking up that section - doing so hit the compression codepath, looked up .zdebug_blah and found a newly constructed empty section... thus, things got weird. This is untestable without a cross-project test (let me know if people would prefer that to no testing). llvm-svn: 205261
* clang/tools/driver/Makefile: Quick fix corresponding to r205181.NAKAMURA Takumi2014-03-311-1/+1
| | | | llvm-svn: 205189
* [OPENMP] Implemented 'copyin' clauseAlexey Bataev2014-03-311-0/+3
| | | | llvm-svn: 205164
* libclang/libIndex: USR generation: mangle source location into USRs for macros,Dmitri Gribenko2014-03-281-4/+12
| | | | | | unless the macro comes from a system header llvm-svn: 205064
* Support for -Wa,-compress-debug-sections.David Blaikie2014-03-271-0/+4
| | | | | | Also, while I'm here, support -nocompress-debug-sections too. llvm-svn: 204959
* [cleanup] Stop specifying size overrides for BumpPtrAllocators.Chandler Carruth2014-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | These don't seem to have any real point. Let's start with IndexingContext. I can't come up with any conceivable reason to have many hundereds of thousands of these alive in an address space which would make the 4x difference in allocated (but unused) memory for the string scratch buffer a significant memory usage problem. The EditedSource one is somewhat more surprising. This is an 8x increase in the memory allocated (but not used) per editted source file. However, for this to realistically be a problem, you would need to have over half a million editted source files in a single address space, and even that would only really have problems on 32-bit Windows where you really only have 2gb of virtual address space. And what's more important, the fix to this if it is actually an issue shouldn't be to shrink the allocator's size, it is to pass a single allocator into *many* edited source file objects and let them share the memory. These were the only two uses of custom sized BumpPtrAllocators (excluding ones in the JIT using a custom allocation strategy) in all of LLVM, Clang, LLD, LLDB, or Polly. I don't think we actually need this complexity in the primary BumpPtrAllocator at all and am planning to remove it. llvm-svn: 204910
* [OPENMP] parsing of clause 'safelen' (for directive 'omp simd')Alexey Bataev2014-03-211-0/+4
| | | | llvm-svn: 204428
* [analyzer] scan-build: allow quotes around "-cc1" when looking at -### output.Jordan Rose2014-03-201-1/+1
| | | | | | Third time's the charm. Patch by Brennan Shacklett! llvm-svn: 204362
* [analyzer] scan-build: match whitespace instead of word boundaries around flags.Jordan Rose2014-03-201-1/+1
| | | | | | | | | Because neither ' ' nor '-' is alphanumeric, \b won't match between them! Since in this case we know our output is coming from a -### invocation, we should always have spaces on both sides of the flag we're trying to match, "-cc1". llvm-svn: 204356
* Tooling: Move heavyweight vectors around instead of copying.Benjamin Kramer2014-03-201-8/+6
| | | | | | While there convert to range-based for loops. No functionality change. llvm-svn: 204338
* [libclang] Introduce clang_VirtualFileOverlay_setCaseSensitivity that ↵Argyrios Kyrtzidis2014-03-202-4/+27
| | | | | | | | | | exposes the VFS option to set the case-sensitivity for lookups. rdar://16374696 llvm-svn: 204303
* [analyzer] scan-build: when matching flags, make sure the - is the first letter.Jordan Rose2014-03-191-3/+3
| | | | | | PR19191 llvm-svn: 204253
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-158-133/+128
| | | | | | class. llvm-svn: 204002
* [C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with ↵Aaron Ballman2014-03-141-3/+2
| | | | | | iterator_range decls(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203947
* [C++11] Replacing OMPThreadPrivateDecl and OMPClause iterators ↵Aaron Ballman2014-03-141-4/+2
| | | | | | varlist_begin() and varlist_end() with iterator_range varlists(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203937
* [C++11] Replacing ObjCImplementationDecl iterators ivar_begin() and ↵Aaron Ballman2014-03-141-5/+2
| | | | | | ivar_end() with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203932
* static link pollySebastian Pop2014-03-142-0/+19
| | | | llvm-svn: 203887
* [C++11] Replacing UsingDecl iterators shadow_begin() and shadow_end() with ↵Aaron Ballman2014-03-131-5/+3
| | | | | | iterator_range shadows(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203825
* [C++11] Replacing CXXRecordDecl iterators init_begin() and init_end() with ↵Aaron Ballman2014-03-132-9/+4
| | | | | | iterator_range inits(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203819
* [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with ↵Aaron Ballman2014-03-132-6/+3
| | | | | | iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203803
* Revert "CodeGen: Use a binary format for instrumentation based profiling"Justin Bogner2014-03-121-1/+0
| | | | | | | | | I've clearly done something wrong with how to get this to link correctly. Reverting for now. This reverts commit r203711. llvm-svn: 203712
* CodeGen: Use a binary format for instrumentation based profilingJustin Bogner2014-03-121-0/+1
| | | | | | | | This updates CodeGenPGO to use the ProfileDataReader introduced to llvm in r203703 and the new API for writing out the profile introduced to compiler-rt in r203710. llvm-svn: 203711
* Check for LLVM_ON_WIN32 instead of _WIN32.Hans Wennborg2014-03-121-2/+3
| | | | | | This is a follow-up to r203624 to address Anton's comment. llvm-svn: 203668
* Use vector<T>::data() to simplify codeDmitri Gribenko2014-03-121-3/+1
| | | | llvm-svn: 203665
* Be case sensitive when determining driver mode based on argv[0] except on ↵Hans Wennborg2014-03-111-0/+3
| | | | | | | | | Windows This narrows the impact of r188833 after Dimitry pointed out that it's good to be able to tell the difference between 'cc' and 'CC'. llvm-svn: 203624
* Add a main function to the clang-format.py vim integration.Ahmed Charles2014-03-101-40/+43
| | | | | | This will allow using an early return statement in a subsequent change. llvm-svn: 203501
* Replace CLANG_IS_PRODUCTION with CLANG_PLUGIN_SUPPORT.Rafael Espindola2014-03-102-12/+11
| | | | llvm-svn: 203473
OpenPOWER on IntegriCloud