- Jun 19, 2017
-
-
Christof Douma authored
This reverts commit 305684. This patch breaks extra/tools/clang-tidy git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305688 91177308-0d34-0410-b5e6-96231b3b80d8
-
Christof Douma authored
Move the DiagnosticRenderer and its dependents to using FullSourceLocs instead of a SourceLocation and SourceManager pointer. The changeset is rather large but entirely mechanical. This is step one to allow DiagnosticRenderer to take either llvm::SMLocs or clang::SourceLocations. Patch by Sanne Wouda Review: https://reviews.llvm.org/D31709 Change-Id: If351a112cdf6718e2d3ef6721b8da9c6376b32dd git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305684 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
With this patch, one can configure a BufWrite hook that will make the clang-format integration compute a diff of the current buffer with the file that's on disk and format all changed lines. This should create a zero-overhead auto-format solution that doesn't require the file to already be clang-format clean to avoid spurious diffs. Review: https://reviews.llvm.org/D32429 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305665 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 17, 2017
-
-
Petr Hosek authored
When -no-canonical-prefixes option is used and argv0 contains only a program name, we need to do a PATH lookup to get an executable path, otherwise the return value won't be a valid path and any subsequent uses of it (e.g. when invoking -cc1) will fail with an error. This patch fixes PR9576. Differential Revision: https://reviews.llvm.org/D34290 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305600 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 15, 2017
-
-
Eric Fiselier authored
Most of libc++'s header files don't use extension. This prevents using git-clang-format on them, which is frustrating. This patch allows empty extensions to be passed using either the --extensions option, or the clangformat.extensions git-config value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305437 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 12, 2017
-
-
Alex Lorenz authored
getting the platform's availability Patch by Ronald Wampler! Differential Revision: https://reviews.llvm.org/D33478 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305221 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
cc1as does not currently access the "--" version of this flag. At the very least this needs to be fixed and proper test cases need to be added. Simple reproducer: clang -Wa,--compress-debug-sections /tmp/test.cc Result: error: unknown argument: '--compress-debug-sections' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305182 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 11, 2017
-
-
Saleem Abdulrasool authored
These options control the behaviour of the compression of debug info sections on ELF targets. Our behaviour slightly diverges from the behaviour of GCC. `-gz` maps to the `-compress-debug-sections` rather than `-compress-debug-sections=zlib` or `-compress-debug-sections=zlib-gnu`. This small divergence allows us to be compatible across versions of binutils (=zlib support was introduced in 2.26, while earlier versions only support =zlib-gnu). This also allows users to not have to worry about the version of the assembler they may be using if they are not using the IAS. Previously, users would have had to go through the internal option `-compress-debug-sectionss` and pass that through to the assembler, which is no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305165 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 10, 2017
-
-
Alex Lorenz authored
It caused `Index/availability.c` test failure on Linux git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305122 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 09, 2017
-
-
Alex Lorenz authored
availability Patch by Ronald Wampler! Differential Revision: https://reviews.llvm.org/D33478 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305117 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
No-one was using this, and it's not meaningful in general -- FrontendActions can be run on inputs that don't have a corresponding source file. The current frontend input can be obtained by asking the FrontendAction if any future action actually needs it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305045 91177308-0d34-0410-b5e6-96231b3b80d8
-
Argyrios Kyrtzidis authored
[libclang] Introduce a new parsing option 'CXTranslationUnit_SingleFileParse' that puts preprocessor in a mode for parsing a single file only. This is useful for parsing a single file, as a fast/inaccurate 'mode' that can still provide declarations from the file, like the classes and their methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305044 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
This is tied with the LLVM side of the change to expose the debug information compression types to clang. We now track the compression type as an enumeration rather than a boolean. We still use the same value (GNU) that we did previously. This is in preparation to support passing down the compression type and switch it based on the command line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305039 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 08, 2017
-
-
Sven van Haastregt authored
Expose the following functions: - clang_getTypedefName - clang_getAddressSpace Patch by Simon Perretta. Differential Revision: https://reviews.llvm.org/D33598 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304978 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 06, 2017
-
-
Dimitry Andric authored
Summary: Other llvm tools display their registered targets when showing version information, but for some reason clang has never done this. To support this, D33899 adds the llvm parts, which make it possible to print version information to arbitrary raw_ostreams. This change adds a call to printRegisteredTargetsForVersion in clang's PrintVersion, and adds a raw_ostream parameter to two other PrintVersion functions. Reviewers: beanz, chandlerc, dberris, mehdi_amini, zturner Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33900 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304836 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 30, 2017
-
-
Erik Verbruggen authored
A suspended translation unit uses significantly less memory but on the other side does not support any other calls than clang_reparseTranslationUnit to resume it or clang_disposeTranslationUnit to dispose it completely. This helps IDEs to reduce the memory footprint. The data that is freed by a call to clang_suspendTranslationUnit will be re-generated on the next (re)parse anyway. Used with a preamble, this allows pretty fast resumption of the translation unit for further use (compared to disposal of the translation unit and a parse from scratch). Patch by Nikolai Kosjar! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304212 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 26, 2017
-
-
Petr Hosek authored
The scan-build script provided by clang can be used to detect defects in code in the compile time. However, we discovered that the "--target=<value>" flag in clang is not properly handled by this script, which results in failures when analyzing projects that have used this flag in their makefile. This single line of change allows scan-build script to properly handle the "--target=<value>" flag. Patch by Haowei Wu Differential Revision: https://reviews.llvm.org/D33263 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304025 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 25, 2017
-
-
Eric Fiselier authored
Summary: This patch attempts to make `git-clang-format` both python2 and python3 compatible. Currently it only works in python2. Reviewers: modocache, compnerd, djasper, jbcoe, srhines, ddunbar Reviewed By: jbcoe Subscribers: kimgr, mgorny, llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D30773 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303871 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 24, 2017
-
-
Serge Pavlov authored
This is recommit of r302775, reverted in r302777 due to a fail in clang-tidy. Original mesage is below. Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303756 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 23, 2017
-
-
Krasimir Georgiev authored
Summary: This field is never assigned to and it's only ever read from libclang. This patch removes it and adapts libclang to return constants. Reviewers: klimek, bkramer Reviewed By: klimek Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D32351 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303635 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sven van Haastregt authored
Expose pipe, sampler_t, clk_event_t, queue_t, reserve_id_t, and all image types. Update the opencl-types.cl test RUN line such that we can test the OpenCL 2.0 types. Patch by Simon Perretta. Differential Revision: https://reviews.llvm.org/D33197 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303626 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 20, 2017
-
-
Argyrios Kyrtzidis authored
Patch by Nathan Hawes. https://reviews.llvm.org/D33346 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303484 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 13, 2017
-
-
Sean Callanan authored
ASTImporter has some bugs when it's importing types that themselves come from an ExternalASTSource. This is exposed particularly in the behavior when comparing complete TagDecls with forward declarations. This patch does several things: - Adds a test case making sure that conflicting forward-declarations are resolved correctly; - Extends the clang-import-test harness to test two-level importing, so that we make sure we complete types when necessary; and - Fixes a few bugs I found this way. Failure to complete types was one; however, I also discovered that complete RecordDecls aren't properly added to the redecls chain for existing forward declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302975 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 11, 2017
-
-
Serge Pavlov authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302777 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302775 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 10, 2017
-
-
Argyrios Kyrtzidis authored
[libclang] Introduce clang_Cursor_isExternalSymbol that provides info about decls marked with external_source_symbol attribute git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302677 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 03, 2017
-
-
Richard Smith authored
The intent for an explicit module build is that the diagnostics produced within the module are those that were configured when the module was built, not those that are enabled within a user of the module. This includes diagnostics that don't actually show up until the module is used (for instance, diagnostics produced during template instantiation and weird cases like -Wpadded). We serialized and restored the diagnostic state for individual warning groups, but previously did not track the state for flags like -Werror and -Weverything, which are implemented as separate bits rather than as part of the diagnostics mapping information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301992 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 02, 2017
-
-
Emilio Cobos Alvarez authored
Differential Revision: https://reviews.llvm.org/D32566 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301902 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 28, 2017
-
-
Emilio Cobos Alvarez authored
This allows users to query the target triple and target pointer width, which would make me able to fix https://github.com/servo/rust-bindgen/issues/593 and other related bugs in an elegant way (without having to manually parse the target triple in the command line arguments). Differential Revision: https://reviews.llvm.org/D32389 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301648 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 27, 2017
-
-
Tim Northover authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301585 91177308-0d34-0410-b5e6-96231b3b80d8
-
Argyrios Kyrtzidis authored
[libclang] Enhance clang_Cursor_isDynamicCall and clang_Cursor_getReceiverType to handle ObjC property references Also enhance clang_Cursor_getReceiverType to handle C++ method calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301568 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
This will suppress any live diagnostics caused by editor placeholders in Xcode. rdar://31833579 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301542 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 26, 2017
-
-
Vedant Kumar authored
This reverts commit r301469. It isn't needed with r301470, which fixes the API break introduced in the original commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301472 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
This reverts commit r301449. It breaks the build with: MacroPPCallbacks.h:114:50: error: non-virtual member function marked 'override' hides virtual member function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301469 91177308-0d34-0410-b5e6-96231b3b80d8
-
Frederich Munch authored
Summary: The PPCallbacks::MacroUndefined callback is currently insufficient for clients that need to track the MacroDirectives. This patch adds an additional argument to PPCallbacks::MacroUndefined that is the undef MacroDirective. Reviewers: bruno, manmanren Reviewed By: bruno Subscribers: nemanjai, cfe-commits Differential Revision: https://reviews.llvm.org/D29923 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301449 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 25, 2017
-
-
Alex Lorenz authored
Fixes PR32539. Patch by Emilio Cobos Álvarez! Differential Revision: https://reviews.llvm.org/D32348 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301328 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 24, 2017
-
-
Argyrios Kyrtzidis authored
[index] If the 'external_source_symbol' attribute indicates 'Swift' as the language then report it accordingly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301183 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 21, 2017
-
-
Krasimir Georgiev authored
Summary: This patch replaces the boolean IncompleteFormat that is used to notify the client if an unrecoverable syntax error occurred by a struct that also contains a line number. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D32298 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300985 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 20, 2017
-
-
Eric Fiselier authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300895 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Fiselier authored
This patch fixes most of the python3 incompatabilities within git-clang-format while keeping the script python2 compatible. There is still one remaining incompatability that prevents using Python3 which is the `str` vs `byte` type change. I plan to put those fixes up for review separately. This patch contains fixes for the following incompatabilities: 1) Use the new style Python3 `print` function. This requires importing __future__.print_function. 2) Fix incompatability between the Python3 octal prefix and the octal prefix Git uses. 3) Replace use of dict.iteritems() with dict.viewitems() because iteritems() has been removed in Python3. viewitems() reviews python 2.7 but that is also what the script is documented as requiring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300891 91177308-0d34-0410-b5e6-96231b3b80d8
-