aboutsummaryrefslogtreecommitdiff
path: root/clang/tools
AgeCommit message (Collapse)AuthorFilesLines
2013-11-26Merging r195420:Bill Wendling1-2/+2
------------------------------------------------------------------------ r195420 | alp | 2013-11-22 00:00:20 -0800 (Fri, 22 Nov 2013) | 6 lines Add txt file extension to VS solution's README This matches other README.txt files in LLVM and makes things more obvious on Windows where it's likely to be read. CRLFs are retained for the same reason. Also fix Visual Studio product name. ------------------------------------------------------------------------ llvm-svn: 195725
2013-11-14Install clang-format's editor integrations in $PREFIX/share/clang/Hans Wennborg1-0/+5
They were previously not part of the install target. Differential Revision: http://llvm-reviews.chandlerc.com/D2154 llvm-svn: 194741
2013-11-14Work around a bug in old gcc on the FreeBSD bot, which complains aboutDmitri Gribenko1-3/+3
ambiguity between index() function and clang::index namespace. llvm-svn: 194638
2013-11-13libclang does not depend directly on clangFormat; but clangIndex doesDmitri Gribenko1-1/+0
llvm-svn: 194611
2013-11-13Documentation parsing: move comment-to-XML conversion routines to libIndexDmitri Gribenko5-1193/+28
llvm-svn: 194610
2013-11-13Make inline functions in a header file static.Dmitri Gribenko1-6/+6
llvm-svn: 194603
2013-11-13Add an optional mapping from source paths to source contents.Manuel Klimek1-0/+36
This allows compilation database implementations for distributed build systems to hand all data to the client to make parsing independent of the file system. llvm-svn: 194571
2013-11-12Documentation parsing: add support for \throws \throw \exception commandsDmitri Gribenko1-0/+13
llvm-svn: 194521
2013-11-12Upgrade the VS solution to 2012.Manuel Klimek3-6/+54
Now we can compile a VSPackage that works with VS 2010-2013 from within VS 2012. llvm-svn: 194488
2013-11-12Fix key bindings for VS 2010.Manuel Klimek1-4/+5
Set the default key-binding only in the text editor; the global binding of ctrl-r,ctrl-f was already taken in VS 2010. llvm-svn: 194482
2013-11-12Recreated the ClangFormat VSPackage with VS 2010.Manuel Klimek7-45/+46
The generated package is now compatible with VS 2010 - 2013. llvm-svn: 194480
2013-11-12Revert unintentional commit from r194477.Manuel Klimek5-53/+67
llvm-svn: 194478
2013-11-12(no commit message)Manuel Klimek5-67/+53
llvm-svn: 194477
2013-11-12Rather than duplicating extension diagnostics to allow them to cause aRichard Smith1-2/+1
substitution failure, allow a flag to be set on the Diagnostic object, to mark it as 'causes substitution failure'. Refactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior rather than a bunch of flags. llvm-svn: 194444
2013-11-09Use a StringRef. Saves 0.00000000000001s on execution time.Bill Wendling1-1/+1
llvm-svn: 194301
2013-11-08Py3k compat for clang-format Sublime Text extension.Sean Silva1-1/+2
Sublime Text 2 uses Python 2.6 Sublime Text 3 uses Python 3.3 The `print` function has been available as a __future__ import since 2.6, so use it. Patch by Johan Engelen! llvm-svn: 194287
2013-11-08clang-format: Write files atomicallyAlp Toker1-11/+1
Switch clang-format over to Rewriter::overwriteChangedFiles(). The previous implementation was attempting to stream back directly to the original file and failing if it was already memory mapped by MemoryBuffer, an operation unsupported by Windows. MemoryBuffer generally mmaps files larger than the physical page size so this will have been difficult to reproduce consistently. This change also reduces flicker in code editors and IDEs on all platforms when reformatting in-place. Note that other incorrect uses of MemoryBuffer exist in LLVM/clang and will need a similar fix. A test should be added for Windows when libFormat performance issues are fixed (it takes longer than a day to format a 1MB file at present!) llvm-svn: 194250
2013-11-06This patch modified ExeBasename as clang-cl.exe to match the preceding comment.Yaron Keren1-1/+1
llvm-svn: 194170
2013-11-06[libclang] Some changes on the linker options for libclang on a CMake build.Argyrios Kyrtzidis1-3/+11
- Use the 'libclang.exports' file. - Pass -Wl,-current_version - Set install name to "@rpath" llvm-svn: 194134
2013-11-04It is no longer necessary to opt out of pretty stack traces.Filip Pizlo1-5/+0
llvm-svn: 193973
2013-10-31Store a TypeArgument on an attribute as a TypeSourceInfo*, rather than as aRichard Smith2-5/+8
QualType with a SourceLocation stashed alongside. llvm-svn: 193803
2013-10-31Factor out custom parsing for iboutletcollection and vec_type_hint attributesRichard Smith2-4/+4
into a separate "parse an attribute that takes a type argument" codepath. This results in both codepaths being a lot cleaner and simpler, and fixes some bugs where the type argument handling bled into the expression argument handling and caused us to both accept invalid and reject valid attribute arguments. llvm-svn: 193731
2013-10-29Use LLVMLibsOptions intead of LDFLAGS when setting the libclang soname. This ↵Sylvestre Ledru1-1/+1
allows 'make LDFLAGS=foo' to be set correctly (and matches the way it is done with libllvm and liblldb) llvm-svn: 193607
2013-10-25clang-format.py: Make formatting unnamed buffers work again (broke in r190691).Nico Weber1-3/+4
llvm-svn: 193433
2013-10-22[analyzer] scan-build: Handle -m* option wildcard after compiler/linker flags.Jordan Rose1-4/+5
Some of the shared compiler/linker flags start with -m, so they've been getting passed to the compiler only since r180073. Now, the -m* wildcard is processed after the shared flags and the ignored flags. Found by Laszlo Nagy! llvm-svn: 193184
2013-10-17Rename some functions for consistency.Rafael Espindola1-4/+4
Every other function in Redeclarable.h was using Decl instead of Declaration. llvm-svn: 192900
2013-10-15Add llvm_unreachable to pacify GCC's dropping off non-void function warning.Benjamin Kramer1-1/+4
+ 80 cols fix. llvm-svn: 192728
2013-10-15[libclang] When querying for the availability of an enumerator, pick up the ↵Argyrios Kyrtzidis1-40/+75
availability from the enum declaration. rdar://14789001. llvm-svn: 192718
2013-10-11Changed clang-format-diff.py to output diff by default. Added -i option to ↵Alexander Kornienko1-3/+22
apply changes to files instead. Summary: "svn diff|clang-format-diff.py" will just output the diff. Now it's possible to use: svn diff|clang-format-diff.py|patch -p0 as an equivalent to: svn diff|clang-format-diff.py -i ;) Reviewers: djasper Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1840 llvm-svn: 192505
2013-10-11[libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ↵Argyrios Kyrtzidis3-0/+24
ref-qualifier information of function type. Patch by Che-Liang Chiou! llvm-svn: 192493
2013-10-08clang-format: Don't exit with failure on empty files.Daniel Jasper2-2/+3
Also let clang-format-diff.py detect errors based on clang-format's return code. Otherwise messages like "Can't find usable .clang-format, falling back to LLVM style" can make it fail, which might be undesired. Patch by Alp Toker. Thank you! llvm-svn: 192184
2013-10-07Driver: Use the canonical command line arguments.David Majnemer1-1/+10
Summary: Use the arguments given to the OS at process creation-time instead of the arguments passed into main() by the C runtime environment. The ones that main() received may not be suitable (e.g. not Unicode). Depends on D1834 CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1835 llvm-svn: 192091
2013-10-03[libclang] Introduce clang_Type_getClassType which returns the class type of ↵Argyrios Kyrtzidis2-0/+17
a member pointer type. Patch by Che-Liang Chiou! llvm-svn: 191906
2013-10-02clang-format: Fix clang-format-diff.py according to diff specification.Daniel Jasper1-2/+5
Patch by Alp Toker. Many thanks! Original descriptions: clang-format-diff incorrectly modifies unchanged lines due to an error in diff parsing. The unified diff format has a default line change count of 1, and 0 may be specified to indicate that no lines have been added. This patch updates the parser to accurately reflect the diff specification. This also has the benefit of stabilising the operation so it will produce the same output when run multiple times on the same changeset, which was previously not the case. No tests added because this script is not currently tested (though we should look into that!) llvm-svn: 191820
2013-10-01[OpenMP] Added parsing and semantic analysis for firstprivate clauseAlexey Bataev2-0/+11
llvm-svn: 191730
2013-09-30Remove unused variable introduced in 191666David Blaikie1-3/+0
llvm-svn: 191682
2013-09-30Moving style option formatting to libFormatEdwin Vane1-78/+6
The help text for clang-format's -style option and the function that processes its value is moved to libFormat in this patch. The goal is to enable other tools that use libFormat and also have a -style option to behave consistently with clang-format. llvm-svn: 191666
2013-09-26Fix up fallout from r187156.Bob Wilson1-1/+1
The previous change caused the driver to translate -Wa,-L to the -msave-temp-labels option for cc1as, but cc1as did not accept that option. This patch follows the same approach used for similar options (-relax-all, -noexecstack) in the previous patch. llvm-svn: 191458
2013-09-25[libclang] Provide location for attributes and expose 'packed' attribute.Argyrios Kyrtzidis2-0/+13
Patch by Loïc Jaquemet! llvm-svn: 191345
2013-09-24[OPENMP] Bug fixes and improvements.Alexey Bataev2-15/+25
1. Fixed constructor of shared clause. 2. Some macros for clauses processing are replaced by private template methods. 3. Additional checks in sema analysis of OpenMP clauses. llvm-svn: 191265
2013-09-22Fix array_pod_sort predicates after LLVM change.Benjamin Kramer1-12/+3
llvm-svn: 191176
2013-09-21Fix clang-format-diff.py to accept -style again.Daniel Jasper1-1/+1
Copy and paste error in r190935.. llvm-svn: 191137
2013-09-18Simplify clang-format-diff.py using new clang-format options.Daniel Jasper1-59/+26
clang-format's -lines parameter makes this significantly easier. llvm-svn: 190935
2013-09-18Add the intrinsic __builtin_convertvectorHal Finkel2-0/+2
LLVM supports applying conversion instructions to vectors of the same number of elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to cause such instructions to be generated when using builtin vector types. C-style casting on vectors is already defined in terms of bitcasts, and so cannot be used for these conversions as well (without leading to a very confusing set of semantics). As a result, this adds a __builtin_convertvector intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is intended to aid the creation of vector intrinsic headers that create generic IR instead of target-dependent intrinsics (in other words, this is a generic _mm_cvtepi32_ps). As noted in the documentation, the action of __builtin_convertvector is defined in terms of the action of a C-style cast on each vector element. llvm-svn: 190915
2013-09-16[libclang] Don't report a DecayedType as "unexposed", report it as the ↵Argyrios Kyrtzidis1-0/+5
original (as written) type. Patch by Anders Waldenborg! llvm-svn: 190796
2013-09-16[analyzer] scan-build: add missing semicolonJordan Rose1-1/+1
Patch by Kevin Zheng! llvm-svn: 190789
2013-09-14[analyzer] Put more uniqueness in scan-build's temporary directory names.Jordan Rose1-3/+11
This is necessary when running two scan-build processes in parallel. The directory naming scheme is now: yyyy-MM-dd-HHmmss-PID-N 2013-09-13-174210-123-1 where "PID" is the scan-build process ID, and "N" is a sequential counter (not likely to be needed now that seconds are mangled in, but just in case). PR17196, using a suggested fix from Greg Czajkowski! llvm-svn: 190735
2013-09-13Remove unnecessary inclusion of Sema.hDavid Blaikie5-0/+5
Let me tell you a tale... Within some twisted maze of debug info I've ended up implementing an insane man's Include What You Use device. When the debugger emits debug info it really shouldn't, I find out why & then realize the code could be improved too. In this instance CIndexDiagnostics.cpp had a lot more debug info with Clang than GCC. Upon inspection a major culprit was all the debug info describing clang::Sema. This was emitted because clang::Sema is befriended by DiagnosticEngine which was rightly required, but GCC doesn't emit debug info for friends so it never emitted anything for Clang. Clang does emit debug info for friends (will be fixed/changed to reduce debug info size). But why didn't Clang just emit a declaration of Sema if this entire TU didn't require a definition? 1) Diagnostic.h did the right thing, only using a declaration of Sema and not including Sema.h at all. 2) Some other dependency of CIndexDiagnostics.cpp didn't do the right thing. ASTUnit.h, only needing a declaration, still included Sema.h (hence this commit which removes that include and adds the necessary includes to the cpp files that were relying on this) 3) -flimit-debug-info didn't save us because of EnterExpressionEvaluationContext, defined inline in Sema.h which fires the "requiresCompleteType" check/flag (since it uses nested types from Sema and calls Sema member functions) and thus, if debug info is ever emitted for the type, the whole type is emitted and not just a declaration. Improving -flimit-debug-info to account for this would be... hard. Modifying the code so that's not 'required to be complete' might be possible, but probably only by moving EnterExpressionEvaluationContext either into Sema, or out of Sema.h. That might be a bit too much of a contortion to be bothered with. Also, this is only one of the cases where emitting debug info for friends caused us to emit a lot more debug info (this change reduces Clang's DWO size by 0.93%, dropping friends entirely reduces debug info by 3.2%) - I haven't hunted down the other cases, but I assume they might be similar (Sema or something like it). IWYU or a similar tool might help us reduce build times a bit, but analyzing debug info to find these differences isn't worthwhile. I'll take the 3.2% win, provide this small improvement to the code itself, and move on. llvm-svn: 190715
2013-09-13clang-format: Add -assume-filename option for editor integrations.Daniel Jasper4-15/+30
With -style=file, clang-format now starts to search for a .clang-format file starting at the file given with -assume-filename if it reads from stdin. Otherwise, it would start searching from the current directory, which is not helpful for editor integrations. Also changed vim, emacs and sublime integrations to actually make use of this flag. This fixes llvm.org/PR17072. llvm-svn: 190691
2013-09-12Fix the MCTargetAsmParser API change.Joey Gouly1-1/+1
llvm-svn: 190601