aboutsummaryrefslogtreecommitdiff
path: root/clang/include
AgeCommit message (Collapse)Author
2019-01-17[Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.Volodymyr Sapsai
Fixes `-emit-header-module` when GenerateHeaderModuleAction is wrapped by another frontend action. rdar://problem/47302588 Reviewers: rsmith, arphaman Reviewed By: arphaman Subscribers: jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D56766 llvm-svn: 351402
2019-01-16Recommit r351160 "[X86] Make _xgetbv/_xsetbv on non-windows platforms"Craig Topper
V8 has been fixed now. llvm-svn: 351391
2019-01-16[Fixed Point Arithmetic] Add APFixedPoint to APValueLeonard Chan
This adds APFixedPoint to the union of values that can be represented with an APValue. Differential Revision: https://reviews.llvm.org/D56746 llvm-svn: 351368
2019-01-16[Fixed Point Arithmetic] Fixed Point AdditionLeonard Chan
This patch covers addition between fixed point types and other fixed point types or integers, using the conversion rules described in 4.1.4 of N1169. Usual arithmetic rules do not apply to binary operations when one of the operands is a fixed point type, and the result of the operation must be calculated with the full precision of the operands, so we should not perform any casting to a common type. This patch does not include constant expression evaluation for addition of fixed point types. That will be addressed in another patch since I think this one is already big enough. Differential Revision: https://reviews.llvm.org/D53738 llvm-svn: 351364
2019-01-16[MSP430] Improve support of 'interrupt' attributeAnton Korobeynikov
* Accept as an argument constants in range 0..63 (aligned with TI headers and linker scripts provided with TI GCC toolchain). * Emit function attribute 'interrupt'='xx' instead of aliases (used in the backend to create a section for particular interrupt vector). * Add more diagnostics. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56663 llvm-svn: 351344
2019-01-16[X86] Correct the type string for __builtin_ia32_gathersiv16sf to make the ↵Craig Topper
indices an integer type not an FP type. The element count and width remain the same. This went unnoticed because default conversion from builtin to intrinsic will generate a bitcast if the types don't match. llvm-svn: 351301
2019-01-15[clang-cl] Alias /Zc:alignedNew[-] to -f[no-]aligned-allocationReid Kleckner
Implements PR40180. clang-cl has one minor behavior difference with cl with this change. Clang allows the user to enable the C++17 feature of aligned allocation without enabling all of C++17, but MSVC will not call the aligned allocation overloads unless -std:c++17 is passed. While our behavior is technically incompatible, it would require making driver mode specific changes to match MSVC precisely, and clang's behavior is useful because it allows people to experiment with new C++17 features individually. Therefore, I plan to leave it as is. llvm-svn: 351249
2019-01-15Implement BlockDecl::Capture dump in terms of visitorsStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56709 llvm-svn: 351239
2019-01-15NFC: Implement OMPClause dump in terms of visitorsStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56708 llvm-svn: 351236
2019-01-15Implement CXXCtorInitializer dump in terms of VisitorStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56707 llvm-svn: 351235
2019-01-15[Nios2] Remove Nios2 backendCraig Topper
As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months. Differential Revision: https://reviews.llvm.org/D56690 llvm-svn: 351230
2019-01-15[MSP430] Provide a toolchain descriptionAnton Korobeynikov
This is an initial implementation for msp430 toolchain including -mmcu option support -mhwmult options support -integrated-as by default The toolchain uses msp430-elf-as as a linker and supports msp430-gcc toolchain tree. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56658 llvm-svn: 351228
2019-01-15Revert "[X86] Make _xgetbv/_xsetbv on non-windows platforms"Benjamin Kramer
This reverts commit r351160. Breaks building v8. llvm-svn: 351210
2019-01-15Revert "Correct the source range returned from preprocessor callbacks."Benjamin Kramer
This reverts commit r350891. Also add a test case that would return an empty string with r350891. llvm-svn: 351209
2019-01-15Reduce ASTMatchers stack footprint. Addresses http://llvm.org/PR38851Alexander Kornienko
The BoundNodesTreeBuilder class is used both directly and indirectly as a local variable in matchesAncestorOfRecursively, memoizedMatchesAncestorOfRecursively and other functions that happen to be on long recursive call paths. By reducing the inline storage size of the SmallVector we dramatically reduce the stack requirements of ASTMatchers. Running clang-tidy with a large number of checks enabled on a few arbitrarily chosen files show no performance regression. llvm-svn: 351196
2019-01-15NFC: Move Decl node handling to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56643 llvm-svn: 351175
2019-01-15[ASTDump] NFC: Move dump of type nodes to NodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56642 llvm-svn: 351172
2019-01-15[X86] Make _xgetbv/_xsetbv on non-windows platformsCraig Topper
Summary: This patch attempts to redo what was tried in r278783, but was reverted. These intrinsics should be available on non-windows platforms with "xsave" feature check. But on Windows platforms they shouldn't have feature check since that's how MSVC behaves. To accomplish this I've added a MS builtin with no feature check. And a normal gcc builtin with a feature check. When _MSC_VER is not defined _xgetbv/_xsetbv will be macros pointing to the gcc builtin name. I've moved the forward declarations from intrin.h to immintrin.h to match the MSDN documentation and used that as the header file for the MS builtin. I'm not super happy with this implementation, and I'm open to suggestions for better ways to do it. Reviewers: rnk, RKSimon, spatel Reviewed By: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56686 llvm-svn: 351160
2019-01-14[ASTDump] NFC: Move dumping of QualType node to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56641 llvm-svn: 351116
2019-01-14[ASTDump] NFC: Move Type Visit implementation to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56639 llvm-svn: 351114
2019-01-14Improve a -Wunguarded-availability noteErik Pilkington
Mention the deployment target, and don't say "partial" which doesn't really mean anything to users. rdar://problem/33601513 Differential revision: https://reviews.llvm.org/D56523 llvm-svn: 351108
2019-01-14[WebAssembly] Remove old builtinsDan Gohman
This removes the old grow_memory and mem.grow-style builtins, leaving just the memory.grow-style builtins. Differential Revision: https://reviews.llvm.org/D56645 llvm-svn: 351089
2019-01-14[Sema] Expose a control flag for integer to pointer ext warningKristina Brooks
While building openJDK11u, it seems that some of the code in the native core libraries make liberal use of integer to pointer comparisons. We currently have no flag to disabled this warning. This add such a flag. Patch by Kader (abdoul-kader keita) Differential Revision: https://reviews.llvm.org/D56241 llvm-svn: 351082
2019-01-14[AST] Fix double-traversal of code in top-level lambdas in RAV(implicit = yes).Sam McCall
Summary: Prior to r351069, lambda classes were traversed or not depending on the {Function, Class, Namespace, TU} DeclContext containing them. If it was a function (common case) they were not traversed. If it was a namespace or TU (top-level lambda) they were traversed as part of that DeclContext traversal. r351069 "fixed" RAV to traverse these as part of the LambdaExpr, which is the right place. But top-level lambdas are now traversed twice. We fix that as blocks and block captures were apparently fixed in the past. Maybe it would be nicer to avoid adding the lambda classes to the DeclContext in the first place, but I can't work out the implications of that. Reviewers: bkramer, klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56665 llvm-svn: 351075
2019-01-14clang-cl: Fix help text for /O<flags>: '/O2y-' means '/O2 /Oy-', not '/O2 /y-'Nico Weber
Differential Revision: https://reviews.llvm.org/D56489 llvm-svn: 351062
2019-01-14clang-cl: Align help texts for /O1 and O2Nico Weber
Makes it a bit easier to see what exactly the difference is. Also use "same as" instead of "equivalent to", because that's faster to read. Differential Revision: https://reviews.llvm.org/D56488 llvm-svn: 351061
2019-01-14[OpenCL] Set generic addr space of 'this' in special class members.Anastasia Stulova
Set address spaces of 'this' param correctly for implicit special class members. This also changes initialization conversion sequence to separate address space conversion from other qualifiers in case of binding reference to a temporary. In this case address space conversion should happen after the binding (unlike for other quals). This is needed to materialize it correctly in the alloca address space. Initial patch by Mikael Nilssoni! Differential Revision: https://reviews.llvm.org/D56066 llvm-svn: 351053
2019-01-14[AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.Sam McCall
Summary: This fixes ASTContext's parent map for nodes in such classes (e.g. operator()). https://bugs.llvm.org/show_bug.cgi?id=39949 This also changes the observed shape of the AST for implicit RAVs. - this includes AST MatchFinder: cxxRecordDecl() now matches lambda classes, functionDecl() matches the call operator, and the parent chain is body -> call operator -> lambda class -> lambdaexpr rather than body -> lambdaexpr. - this appears not to matter for the ASTImporterLookupTable builder - this doesn't matter for the other RAVs in-tree. In order to do this, we remove the TraverseLambdaBody hook. The problem is it's hard/weird to ensure this hook is called when traversing via the implicit class. There were just two users of this hook in-tree, who use it to skip bodies. I replaced these with explicitly traversing the captures only. Another approach would be recording the bodies when the lambda is visited, and then recognizing them later. I'd be open to suggestion on how to preserve this hook, instead. Reviewers: aaron.ballman, JonasToth Subscribers: cfe-commits, rsmith, jdennett Differential Revision: https://reviews.llvm.org/D56444 llvm-svn: 351047
2019-01-14[X86] Remove mask parameter from avx512 pmultishiftqb intrinsics. Use select ↵Craig Topper
in IR instead. Fixes PR40259 llvm-svn: 351036
2019-01-12NFC: Make utility privateStephen Kelly
No callers are external to the class anymore. llvm-svn: 351015
2019-01-12[ASTDump] NFC: Move dump of individual Stmts to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55340 llvm-svn: 351014
2019-01-12Implement TemplateArgument dumping in terms of VisitorStephen Kelly
Summary: Split the output streaming from the traversal to other AST nodes. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55491 llvm-svn: 351012
2019-01-12[ASTDump] Change parameter to StringRefStephen Kelly
llvm-svn: 351011
2019-01-11[analyzer] Support for OSObjects out parameters in RetainCountCheckerGeorge Karpenkov
rdar://46357478 rdar://47121327 Differential Revision: https://reviews.llvm.org/D56240 llvm-svn: 350982
2019-01-11[analyzer] Introduce a convenience method for getting a CallEvent from an ↵George Karpenkov
arbitrary Stmt Differential Revision: https://reviews.llvm.org/D56300 llvm-svn: 350981
2019-01-11[Darwin][Driver] Don't pass a file as object_path_lto during ThinLTOSteven Wu
Summary: After r327851, Driver::GetTemporaryPath will create the file rather than just create a potientially unqine filename. If clang driver pass the file as parameter as -object_path_lto, ld64 will pass it back to libLTO as GeneratedObjectsDirectory, which is going to cause a LLVM ERROR if it is not a directory. Now during thinLTO, pass a temp directory path to linker instread. rdar://problem/47194182 Reviewers: arphaman, dexonsmith Reviewed By: arphaman Subscribers: mehdi_amini, inglorion, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D56608 llvm-svn: 350970
2019-01-11Implement Attr dumping in terms of visitorsStephen Kelly
Remove now-vestigial dumpType and dumpBareDeclRef methods. The old tablegen generated code used to expect them to be present, but the new generated code has no such requirement. Reviewers: aaron.ballman Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D55492 llvm-svn: 350958
2019-01-11[ASTDump] Add utility for dumping a label with child nodesStephen Kelly
Summary: Use it to add optional label nodes to Stmt dumps. This preserves behavior of InitExprList dump: // CHECK-NEXT: `-InitListExpr {{.+}} <col:13, col:15> 'U [3]' // CHECK-NEXT: |-array_filler: InitListExpr {{.+}} <col:15> 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-InitListExpr {{.+}} <col:14> 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-IntegerLiteral {{.+}} <col:14> 'int' 1 Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55488 llvm-svn: 350957
2019-01-11[LTO] Add option to enable LTOUnit splitting, and disable unless neededTeresa Johnson
Summary: Adds a new -f[no]split-lto-unit flag that is disabled by default to control module splitting during ThinLTO. It is automatically enabled for -fsanitize=cfi and -fwhole-program-vtables. The new EnableSplitLTOUnit codegen flag is passed down to llvm via a new module flag of the same name. Depends on D53890. Reviewers: pcc Subscribers: ormris, mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D53891 llvm-svn: 350949
2019-01-11[attributes] Extend os_returns_(not_?)_retained attributes to parametersGeorge Karpenkov
When applied to out-parameters, the attributes specify the expected lifetime of the written-into object. Additionally, introduce OSReturnsRetainedOn(Non)Zero attributes, which specify that an ownership transfer happens depending on a return code. Differential Revision: https://reviews.llvm.org/D56292 llvm-svn: 350942
2019-01-11[Sema] If CheckPlaceholderExpr rewrites the initializer of an autoAkira Hatanaka
variable during auto type deduction, use the rewritten initializer when performing initialization of the variable. This silences spurious -Warc-repeated-use-of-weak warnings that are issued when the initializer uses a weak ObjC pointer. Differential Revision: https://reviews.llvm.org/D55662 llvm-svn: 350917
2019-01-11Remember to instantiate explicit template argument lists in a friendRichard Smith
function declaration. We'd previously often just drop these on the floor, and friend redeclaration matching would usually (but not always) figure out the right redeclaration anyway. Also, don't try to match a dependent friend function template specialization to a template until instantiation, and don't forget to reject qualified friend declarations in dependent contexts that don't name an already-declared entity. llvm-svn: 350915
2019-01-11[AST] Remove ASTContext from getThisType (NFC)Brian Gesiak
Summary: https://reviews.llvm.org/D54862 removed the usages of `ASTContext&` from within the `CXXMethodDecl::getThisType` method. Remove the parameter altogether, as well as all usages of it. This does not result in any functional change because the parameter was unused since https://reviews.llvm.org/D54862. Test Plan: check-clang Reviewers: akyrtzi, mikael Reviewed By: mikael Subscribers: mehdi_amini, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D56509 llvm-svn: 350914
2019-01-11Fix header issues.Richard Trieu
Several headers would fail to compile if other headers were not previously included. The usual issue is that a class is forward declared, but the full definition is needed. The requirement for the definition is use of isa/dyn_cast or calling functions of pointer-packed data types such as DenseMap or PointerIntPair. Add missing includes to these headers. SVals.h required an out-of-line method definition in the .cpp file to avoid circular inclusion of headers with BasicValueFactory.h llvm-svn: 350913
2019-01-10[WebAssembly] Add unimplemented-simd128 feature, gate builtinsThomas Lively
Summary: Depends on D56501. Also adds a macro define `__wasm_unimplemented_simd128__` for feature detection of unimplemented SIMD builtins. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits, rrwinterton llvm-svn: 350909
2019-01-10Correct the source range returned from preprocessor callbacks.Aaron Ballman
This adjusts the source range passed in to the preprocessor callbacks to only include the condition range itself, rather than all of the conditionally skipped tokens. llvm-svn: 350891
2019-01-10NFC: Change case of identifiersStephen Kelly
llvm-svn: 350890
2019-01-10[SemaCXX] add -Woverride-init alias to -Winitializer-overridesNick Desaulniers
Summary: https://bugs.llvm.org/show_bug.cgi?id=40251 https://github.com/ClangBuiltLinux/linux/issues/307 Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits, nathanchance, srhines Differential Revision: https://reviews.llvm.org/D56522 llvm-svn: 350877
2019-01-10[analyzer] Update the category name for RetainCountChecker reportsGeorge Karpenkov
..now that it includes OSObjects rdar://46509986 Differential Revision: https://reviews.llvm.org/D56404 llvm-svn: 350869
2019-01-10[analyzer] [NFC] Reduce redundancy in RetainSummaryManager by using a functionGeorge Karpenkov
Differential Revision: https://reviews.llvm.org/D56282 llvm-svn: 350865