[PATCH] D53633: [AArch64] Implement FP16FML intrinsics

2018-10-23 Thread Bryan Chan via Phabricator via cfe-commits
bryanpkc created this revision. bryanpkc added reviewers: SjoerdMeijer, bogden, efriedma, t.p.northover. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Generate the FP16FML intrinsics into arm_neon.h (AArch64 only for now). Add two new type modifiers to NeonEmitter to handle

[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

2018-10-23 Thread Nicole Mazzuca via Phabricator via cfe-commits
ubsan added a comment. ... Yup, that'd do it. Thanks Richard! Repository: rC Clang https://reviews.llvm.org/D53207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

2018-10-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D53207#1273727, @ubsan wrote: > when I don't specifically don't set the type trait kind of `__alignof` to > `UETT_PreferredAlignOf`, and remove the code in `AlignOfType` to > differentiate between `PreferredAlignOf` and `AlignOf`, all the

[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

2018-10-23 Thread Nicole Mazzuca via Phabricator via cfe-commits
ubsan added a comment. > Is it possible you have LLVM and Clang checked out at different revisions? > That's a common source of weird behavior, particularly in CodeGen tests. Unfortunately no - when I don't specifically don't set the type trait kind of `__alignof` to `UETT_PreferredAlignOf`,

[PATCH] D53543: [analyzer] MallocChecker: pr39348: Realize that sized delete isn't a custom delete.

2018-10-23 Thread Henry Wong via Phabricator via cfe-commits
MTC added inline comments. Comment at: test/Analysis/NewDelete-sized-deallocation.cpp:1 +// RUN: %clang_analyze_cc1 -std=c++17 -analyzer-checker=core,cplusplus -verify -analyzer-output=text %s +// RUN: %clang_analyze_cc1 -std=c++17 -analyzer-checker=core,cplusplus -verify

r345111 - [Sema] Fix -Wcomma in dependent context

2018-10-23 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Oct 23 19:07:41 2018 New Revision: 345111 URL: http://llvm.org/viewvc/llvm-project?rev=345111=rev Log: [Sema] Fix -Wcomma in dependent context When there is a dependent type inside a cast, the CastKind becomes CK_Dependent instead of CK_ToVoid. This fix will check that

[PATCH] D53487: [Driver] Support sanitized libraries on Fuchsia

2018-10-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 170805. phosek marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D53487 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/lib/Driver/ToolChains/CommonArgs.h clang/lib/Driver/ToolChains/Fuchsia.cpp

[PATCH] D53339: [clang-tidy] Add the abseil-duration-factory-float check

2018-10-23 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 170803. hwright marked an inline comment as done. hwright added a comment. Address reviewer comments. https://reviews.llvm.org/D53339 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt

[PATCH] D53339: [clang-tidy] Add the abseil-duration-factory-float check

2018-10-23 Thread Hyrum Wright via Phabricator via cfe-commits
hwright marked 4 inline comments as done. hwright added inline comments. Comment at: clang-tidy/abseil/DurationFactoryFloatCheck.cpp:36 + +static bool InsideMacroDefinition(const MatchFinder::MatchResult , + SourceRange Range) {

[PATCH] D53591: Support the __gnu__ scoped attribute token

2018-10-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks good. We should provide some reserved-name way of naming clang attributes too, but I'm not sure what would be best (`__clang__` is a macro name). Maybe `_Clang`? (And maybe we should

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In https://reviews.llvm.org/D50539#1273654, @vsapsai wrote: > I was using `//` instead of `///` on purpose. Class `VFSFromYamlDirIterImpl` > resides entirely in .cpp file and isn't available outside of it. Comments are > supposed to cover implementation details and

[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

2018-10-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D53207#1268535, @ubsan wrote: > I'm having real difficulty with this - I get really odd errors in seemingly > unrelated tests when I change things. Is it possible you have LLVM and Clang checked out at different revisions? That's a common

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D50539#1272924, @bruno wrote: > LGTM with some minor changes. I was using `//` instead of `///` on purpose. Class `VFSFromYamlDirIterImpl` resides entirely in .cpp file and isn't available outside of it. Comments are supposed to cover

[PATCH] D52441: [CodeGen] Update min-legal-vector width based on function argument and return types

2018-10-23 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D52441#1271545, @rnk wrote: > In https://reviews.llvm.org/D52441#1258317, @craig.topper wrote: > > > Address Reid's comments. Add a comment with a list of all

r345109 - Debug Info (-gmodules): emit full types for non-anchored template specializations

2018-10-23 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Tue Oct 23 17:06:02 2018 New Revision: 345109 URL: http://llvm.org/viewvc/llvm-project?rev=345109=rev Log: Debug Info (-gmodules): emit full types for non-anchored template specializations Before this patch, clang would emit a (module-)forward declaration for template

[PATCH] D53586: Implement Function Multiversioning for Non-ELF Systems.

2018-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Seems reasonable. Should the resolver still be called `?foo@.resolver`, or should it get a new name, since it is quite functionally different now? Comment at: lib/CodeGen/CodeGenFunction.cpp:2381 + +template +static void

r345101 - [analyzer] [NFC] Change scanReachableSymbols to use ranges

2018-10-23 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Oct 23 16:12:12 2018 New Revision: 345101 URL: http://llvm.org/viewvc/llvm-project?rev=345101=rev Log: [analyzer] [NFC] Change scanReachableSymbols to use ranges Remove unused overload. Clean up some usages. Differential Revision:

[PATCH] D53615: [analyzer] [NFC] Change scanReachableSymbols to use ranges

2018-10-23 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345101: [analyzer] [NFC] Change scanReachableSymbols to use ranges (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

[PATCH] D53550: [analyzer] Do not stop tracking CXX methods touching OSObject.

2018-10-23 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345100: [analyzer] Do not stop tracking CXX methods touching OSObject. (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

r345100 - [analyzer] Do not stop tracking CXX methods touching OSObject.

2018-10-23 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Oct 23 16:11:50 2018 New Revision: 345100 URL: http://llvm.org/viewvc/llvm-project?rev=345100=rev Log: [analyzer] Do not stop tracking CXX methods touching OSObject. Trust generalized annotations for OSObject. Differential Revision:

r345099 - [analyzer] Trust summaries for OSObject::retain and OSObject::release

2018-10-23 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Oct 23 16:11:30 2018 New Revision: 345099 URL: http://llvm.org/viewvc/llvm-project?rev=345099=rev Log: [analyzer] Trust summaries for OSObject::retain and OSObject::release Refactor the way in which summaries are consumed for safeMetaCast Differential

[PATCH] D53549: [analyzer] Trust summaries for OSObject::retain and OSObject::release

2018-10-23 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345099: [analyzer] Trust summaries for OSObject::retain and OSObject::release (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-23 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky updated this revision to Diff 170776. oleg.smolsky added a comment. Corrected test regressions, removed temporary hacks. Repository: rC Clang https://reviews.llvm.org/D52676 Files: lib/Format/ContinuationIndenter.cpp lib/Format/FormatToken.h lib/Format/TokenAnnotator.cpp

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-23 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:78 EXPECT_EQ(Expected.str(), format(Code, Style)); +#if 0 if (Style.Language == FormatStyle::LK_Cpp) { Oops., let me fix this... Repository: rC Clang

[PATCH] D53621: Support for groups of attributes in #pragma clang attribute

2018-10-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: aaron.ballman, arphaman. Herald added a subscriber: dexonsmith. This patch allows pushing an empty `#pragma clang attribute push`, then adding multiple attributes to it, then popping them all with `#pragma clang attribute

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-23 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky updated this revision to Diff 170773. oleg.smolsky added a comment. Corrected test regressions. Repository: rC Clang https://reviews.llvm.org/D52676 Files: clang/lib/Format/ContinuationIndenter.cpp clang/lib/Format/FormatToken.h clang/lib/Format/TokenAnnotator.cpp

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-23 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky marked 2 inline comments as done. oleg.smolsky added inline comments. Comment at: unittests/Format/FormatTest.cpp:11604 + " x.end(), //\n" + " [&](int, int) { return 1; });\n" "}\n");

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. `__extendxftf2` and `__trunctfxf2` are for conversions between x86 long double and `__float128`; you'll need to write implementations yourself. (That should be a separate patch.) > Thanks Eli. I also found out that GCC 4.9 does not seem to have these defined > even

[PATCH] D53618: [AArch64] [Windows] Emit unwind tables by default.

2018-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Yep, land it after the dependency. Comment at: lib/Driver/ToolChains/MSVC.cpp:725-727 // Emit unwind tables by default on Win64. All non-x86_32 Windows platforms // such as

[PATCH] D53618: [AArch64] [Windows] Emit unwind tables by default.

2018-10-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added a reviewer: rnk. Herald added subscribers: chrib, kristof.beyls, javed.absar. Unwind tables are necessary even in code that doesn't support exceptions. Among other things, the tables are used for setjmp(), and by debuggers. Depends on

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. For what it's worth, I think the language rule here is wrong, and we should instead be injecting the simple-captures into the lambda's function scope: http://lists.isocpp.org/core/2018/10/5145.php But this appears to be a correct implementation of the rule as written, so

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6636-6638 + def warn_cxx14_compat_parameter_shadow_capture : ExtWarn< +"a lambda parameter that shadows a capture is incompatible with C++ " +"standards before C++17">, InGroup;

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. I am also getting these tests failures because of missing __trunctfxf2 and __extendxftf2. These are provided by libgcc but compiler-rt does not seem to have an implementation for them. Builtins-x86_64-linux :: compiler_rt_logbl_test.c Builtins-x86_64-linux ::

[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

2018-10-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Just some minor nits. Comment at: docs/ReleaseNotes.rst:186 + + Just like other ``-fsanitize=integer`` checks, these issues are **not** + undefined behaviour. But they are

[PATCH] D53617: [AArch64] Support Windows stack probe command-line arguments.

2018-10-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: rnk, hans. Herald added subscribers: kristof.beyls, javed.absar. Adds support for -mno-stack-arg-probe and -mstack-probe-size. (Not really happy copy-pasting code, but that's what we do for all the other Windows targets.) Repository:

[PATCH] D53066: [Driver] Use forward slashes in most linker arguments

2018-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Driver/Driver.cpp:1013-1014 } + for (auto *Str : {, , , , }) +*Str = llvm::sys::path::convert_to_slash(*Str); zturner wrote: > Is this going to affect the cl driver as well? Yeah, if we change the resource

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/Sema/Sema.h:5584 + void addLambdaParameters( + const SmallVectorImpl , + CXXMethodDecl *CallOperator, Scope *CurScope); Maybe this should be `ArrayRef Captures` instead? Repository: rC

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: lib/builtins/fp_lib.h:111 typedef __int128_t srep_t; -typedef long double fp_t; +typedef __float128 fp_t; #define REP_C (__uint128_t) efriedma wrote: > manojgupta wrote: > > Changed long double to __float128 on

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 170757. Rakete added a comment. Use correct clang and version spelling. Repository: rC Clang https://reviews.llvm.org/D53595 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaLambda.cpp

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 170756. manojgupta added a comment. Added checked for defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__) Repository: rCRT Compiler Runtime https://reviews.llvm.org/D53608 Files: lib/builtins/CMakeLists.txt lib/builtins/fp_lib.h Index:

[PATCH] D53522: [Frontend] Include module map header declaration in dependency file output

2018-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/test/Modules/dependency-file-symlinks.c:3 + +// RUN: rm -fr %t +// RUN: mkdir -p %t/cache Oh, and can you please change the order of flags, so it is `rm -rf %t`? The real reason is my personal preference but

[PATCH] D53066: [Driver] Use forward slashes in most linker arguments

2018-10-23 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: lib/Driver/Driver.cpp:1013-1014 } + for (auto *Str : {, , , , }) +*Str = llvm::sys::path::convert_to_slash(*Str); Is this going to affect the cl driver as well? Comment at:

[PATCH] D53066: [Driver] Use forward slashes in most linker arguments

2018-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 170755. mstorsjo retitled this revision from "[RFC] [Driver] Use forward slashes in most linker arguments" to "[Driver] Use forward slashes in most linker arguments". mstorsjo added a comment. Converting more path instances, enough to fix the tests that

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/builtins/fp_lib.h:111 typedef __int128_t srep_t; -typedef long double fp_t; +typedef __float128 fp_t; #define REP_C (__uint128_t) manojgupta wrote: > Changed long double to __float128 on Eli's advice in PR39376.

[PATCH] D53589: [bash-autocompletion] Fix bug when a flag ends with '='

2018-10-23 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu accepted this revision. ruiu added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D53589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 170748. Rakete added a comment. Addressed review comments! :) Thanks Repository: rC Clang https://reviews.llvm.org/D53595 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaLambda.cpp

[PATCH] D53610: [AST] Check that GNU range case statements are correctly imported.

2018-10-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rjmccall. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. The test for case statements did not cover GNU range case statements. Repository: rC Clang https://reviews.llvm.org/D53610 Files:

[PATCH] D53609: [AST] Don't store data for GNU range case statement if not needed.

2018-10-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rjmccall. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Don't store the data for case statements of the form `LHS ... RHS` if not needed. This cuts the size of `CaseStmt` by 1 pointer + 1 `SourceLocation`

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: lib/builtins/fp_lib.h:107 +// __LDBL_MANT_DIG__ is set to 64 for x86_64. +#if __LDBL_MANT_DIG__ == 113 || defined(__x86_64__) #define CRT_LDBL_128BIT I really don't know the accurate set of checks that should be

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. manojgupta added reviewers: efriedma, joerg. Herald added subscribers: Sanitizers, llvm-commits, delcypher, mgorny. float128 builtins are currently not built for x86_64. This causes linker to complain baout missing symbols when linking glibc 2.27 with float128

[PATCH] D53607: [AST] Only store the needed data in IfStmt.

2018-10-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rjmccall. riccibruno added a project: clang. Herald added subscribers: cfe-commits, javed.absar. riccibruno added a dependency: D53605: [AST] Pack PredefinedExpr. Only store the needed data in `IfStmt`. The various `Stmt *` are put in

[PATCH] D53605: [AST] Pack PredefinedExpr

2018-10-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rjmccall. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. riccibruno added a dependency: D53604: [AST] Widen the bit-fields of Stmt to 8 bytes. This patch does 3 things: 1. Move PredefinedExpr below

[PATCH] D53604: [AST] Widen the bit-fields of Stmt to 8 bytes

2018-10-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rjmccall. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Although some classes are using the tail padding of Stmt, most of them are not. In particular the expression classes are not using it since there is

r345075 - NFC: Remove MANGLE_CHECKER from ItaniumMangle.cpp

2018-10-23 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Oct 23 12:55:38 2018 New Revision: 345075 URL: http://llvm.org/viewvc/llvm-project?rev=345075=rev Log: NFC: Remove MANGLE_CHECKER from ItaniumMangle.cpp This hasn't even compiled since 2011. It would be useful to have some test to verify that ItaniumMangle and

[PATCH] D52384: [Sema] Fix redeclaration contexts for enumerators in C

2018-10-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed (with improved comment) in r345073. https://reviews.llvm.org/D52384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r345073 - Change getRedeclContext() to support enumerations as another kind of transparent context in C.

2018-10-23 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Oct 23 12:44:51 2018 New Revision: 345073 URL: http://llvm.org/viewvc/llvm-project?rev=345073=rev Log: Change getRedeclContext() to support enumerations as another kind of transparent context in C. This change fixes PR15071 and ensures that enumerators redefined

[PATCH] D53487: [Driver] Support sanitized libraries on Fuchsia

2018-10-23 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:566 + for (const auto : TC.getLibraryPaths()) { +if(LibPath.length() > 0) { + SmallString<128>

r345071 - Fix doxygen comment.

2018-10-23 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Tue Oct 23 12:39:02 2018 New Revision: 345071 URL: http://llvm.org/viewvc/llvm-project?rev=345071=rev Log: Fix doxygen comment. Modified: cfe/trunk/include/clang/AST/DeclTemplate.h Modified: cfe/trunk/include/clang/AST/DeclTemplate.h URL:

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/Sema/SemaLambda.cpp:510 +for (const auto : Captures) { + if (Capture.Id && Capture.Id->getName() == Param->getName()) { +Error = true; Rakete wrote: > erik.pilkington wrote:

[PATCH] D53522: [Frontend] Include module map header declaration in dependency file output

2018-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Have a few comments but didn't try to come up with edge cases yet. Comment at: clang/include/clang/Lex/ModuleMap.h:649-650 + ///This can differ from \c Header's name due to symlinks. void addHeader(Module *Mod, Module::Header Header, -

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaLambda.cpp:510 +for (const auto : Captures) { + if (Capture.Id && Capture.Id->getName() == Param->getName()) { +Error = true; erik.pilkington wrote: > You should compare

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Thanks for working on this! Can you update www/cxx_dr_status.html too? Comment at: lib/Sema/SemaLambda.cpp:507 + bool Error = false; + if (getLangOpts().CPlusPlus17) { +// Resolution of CWG 2211 in C++17 renders shadowing

[PATCH] D53520: Update the example of BS_Stroustrup to match what is done by clang-format

2018-10-23 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 170723. sylvestre.ledru added a comment. Remove the desc update Repository: rC Clang https://reviews.llvm.org/D53520 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: include/clang/Format/Format.h

[PATCH] D53339: [clang-tidy] Add the abseil-duration-factory-float check

2018-10-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/abseil/DurationFactoryFloatCheck.cpp:29-31 +llvm::APSInt ApInt(/*BitWidth=*/64, /*isUnsigned=*/false); +ApInt = static_cast(Value); +return ApInt; I believe you can do `return

[PATCH] D53595: [C++17] Reject shadowing of capture by parameter in lambda

2018-10-23 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete created this revision. Rakete added a reviewer: rsmith. This change rejects the shadowing of a capture by a parameter in lambdas in C++17. int main() { int a; auto f = [a](int a) { return a; }; } results in: main.cpp:3:20: error: a lambda parameter cannot shadow

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM with some minor changes. Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1008 + // Flag telling if we should iterate through ExternalFS or stop at the last + //

[PATCH] D53339: [clang-tidy] Add the abseil-duration-factory-float check

2018-10-23 Thread Hyrum Wright via Phabricator via cfe-commits
hwright marked 2 inline comments as done. hwright added a comment. I do not have commit privileges, so somebody else would need to submit it. We've had a version of this check running over our internal codebase for several months with no unexpected problems. Comment at:

r345064 - [analyzer] Rename trackNullOrUndefValue to trackExpressionValue

2018-10-23 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Oct 23 11:24:53 2018 New Revision: 345064 URL: http://llvm.org/viewvc/llvm-project?rev=345064=rev Log: [analyzer] Rename trackNullOrUndefValue to trackExpressionValue trackNullOrUndefValue is a long and confusing name, and it does not actually reflect what the

[PATCH] D53228: [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS.

2018-10-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D53228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D53547: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)

2018-10-23 Thread Jim Ingham via cfe-commits
> On Oct 23, 2018, at 11:09 AM, Erik Pilkington via Phabricator > wrote: > > erik.pilkington added a subscriber: jingham. > erik.pilkington added inline comments. > > > > Comment at: clang/lib/Basic/IdentifierTable.cpp:166-167 > // in non-arc mode. > - if (LangOpts.ObjC2

[PATCH] D53522: [Frontend] Include module map header declaration in dependency file output

2018-10-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Erik, thanks for improving this. Comments below. Comment at: clang/include/clang/Lex/ModuleMap.h:650 void addHeader(Module *Mod, Module::Header Header, - ModuleHeaderRole Role, bool Imported = false); +

[PATCH] D53547: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)

2018-10-23 Thread David Chisnall via Phabricator via cfe-commits
theraven accepted this revision. theraven added a comment. This revision is now accepted and ready to land. Looks good for me, and removing all of the code describing Objective-C 4 as ObjC1 makes me happy. Comment at:

[PATCH] D53543: [analyzer] MallocChecker: pr39348: Realize that sized delete isn't a custom delete.

2018-10-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 170704. NoQ marked an inline comment as done. NoQ added a comment. Add tests for different versions of the standard and for different ways to declare operator delete. > Should we remove it then? > why it's fine to remove this branch? Because these two

[PATCH] D53591: Support the __gnu__ scoped attribute token

2018-10-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, dblaikie, echristo. Herald added a subscriber: krytarowski. GCC is currently considering a patch to accept `__gnu__` as a scoped attribute namespace that aliases to `gnu`. This is useful for libstdc++ so that they don't

[PATCH] D53547: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)

2018-10-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 170703. erik.pilkington marked 4 inline comments as done. erik.pilkington added a comment. Fix some spacing mistakes. Thanks! https://reviews.llvm.org/D53547 Files: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp

[PATCH] D53547: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)

2018-10-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a subscriber: jingham. erik.pilkington added inline comments. Comment at: clang/lib/Basic/IdentifierTable.cpp:166-167 // in non-arc mode. - if (LangOpts.ObjC2 && (Flags & KEYARC)) return KS_Enabled; - if (LangOpts.ObjC2 && (Flags & KEYOBJC2)) return

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-23 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky marked 2 inline comments as done. oleg.smolsky added inline comments. Comment at: unittests/Format/FormatTest.cpp:11604 + " x.end(), //\n" + " [&](int, int) { return 1; });\n" "}\n"); djasper

[PATCH] D53308: [Fixed Point Arithmetic] Fixed Point to Boolean Cast

2018-10-23 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345063: [Fixed Point Arithmetic] Fixed Point to Boolean Cast (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D53308?vs=169863=170699#toc Repository: rC

[PATCH] D53543: [analyzer] MallocChecker: pr39348: Realize that sized delete isn't a custom delete.

2018-10-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. > because the guard that prevents it from working is useless and can be removed > as well Should we remove it then? Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:729 + SourceLocation L = FD->getLocation(); + return !L.isValid()

r345063 - [Fixed Point Arithmetic] Fixed Point to Boolean Cast

2018-10-23 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Tue Oct 23 10:55:35 2018 New Revision: 345063 URL: http://llvm.org/viewvc/llvm-project?rev=345063=rev Log: [Fixed Point Arithmetic] Fixed Point to Boolean Cast This patch is a part of https://reviews.llvm.org/D48456 in an attempt to split the casting logic up into

[PATCH] D52949: [Diagnostics] Implement -Wsizeof-pointer-div

2018-10-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 170696. xbolva00 added a comment. - Added MTC'c case to test file https://reviews.llvm.org/D52949 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/Sema/div-sizeof-ptr.c Index:

[PATCH] D52949: [Diagnostics] Implement -Wsizeof-pointer-div

2018-10-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. No warning for your case. https://reviews.llvm.org/D52949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53308: [Fixed Point Arithmetic] Fixed Point to Boolean Cast

2018-10-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:9599 + return false; +return Success(Val.getInt().getBoolValue(), E); + } rjmccall wrote: > I know you haven't really done constant-evaluation yet, but I think you > should

[PATCH] D53589: [bash-autocompletion] Fix bug when a flag ends with '='

2018-10-23 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. yamaguchi added reviewers: teemperor, ruiu. There was a bug that when a flag ends with '=' and no value was suggested, clang autocompletes the flag itself. For example, in bash, it looked like this: $ clang -fmodule-file=[tab] -> $clang

[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

2018-10-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In https://reviews.llvm.org/D52296#1272220, @grimar wrote: > Maybe `-gno-dwo`? So we would write `-genable-split-dwarf -gno-dwo`? I'm not sure how everyone else feels about "-g" flags that modify debug behavior (like "-gsplit-dwarf") versus "-f" flags (eg:

[PATCH] D53587: [clangd] Truncate SymbolID to 16 bytes.

2018-10-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. We should watch out for the downstream backward compatibility. Comment at: clangd/index/Index.h:92 // As USRs (Unified Symbol Resolution) could be large, especially for

[PATCH] D50147: clang-format: support external styles

2018-10-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. The idea here does seem to be a natural extension of -style, at least for the case when the arg is a filename directly. I'm not opposed, happy to review this. I do want to probe the use case a bit though: we have found that configuring via -style= doesn't scale that

[PATCH] D52658: [OpenCL] Remove PIPE_RESERVE_ID_VALID_BIT from opencl-c.h

2018-10-23 Thread Andrew Savonichev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345051: [OpenCL] Remove PIPE_RESERVE_ID_VALID_BIT from opencl-c.h (authored by asavonic, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r345051 - [OpenCL] Remove PIPE_RESERVE_ID_VALID_BIT from opencl-c.h

2018-10-23 Thread Andrew Savonichev via cfe-commits
Author: asavonic Date: Tue Oct 23 10:05:29 2018 New Revision: 345051 URL: http://llvm.org/viewvc/llvm-project?rev=345051=rev Log: [OpenCL] Remove PIPE_RESERVE_ID_VALID_BIT from opencl-c.h Summary: PIPE_RESERVE_ID_VALID_BIT is implementation defined, so lets not keep it in the header.

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D52615#1266320, @filcab wrote: > In https://reviews.llvm.org/D52615#1254567, @rsmith wrote: > > > This seems like an unreasonably long flag name. Can you try to find a > > shorter name for it? > > > `-fsanitize-poison-extra-operator-new`? >

[clang-tools-extra] r345049 - [clang-tidy] Add a separate section for NOLINT(NEXTLINE)? doc.

2018-10-23 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Oct 23 09:48:16 2018 New Revision: 345049 URL: http://llvm.org/viewvc/llvm-project?rev=345049=rev Log: [clang-tidy] Add a separate section for NOLINT(NEXTLINE)? doc. Modified: clang-tools-extra/trunk/docs/clang-tidy/index.rst Modified:

[PATCH] D53295: Mark store and load of block invoke function as invariant.group

2018-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: Prazek. rjmccall added a comment. In https://reviews.llvm.org/D53295#1271590, @Anastasia wrote: > Btw, blocks w/o captures are already optimized into regular calls? That's a very easy optimization for the optimizer to do because the global can be marked constant.

[PATCH] D53587: [clangd] Truncate SymbolID to 16 bytes.

2018-10-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. The goal is 8 bytes, which has a nonzero risk of collisions with huge indexes. This patch should shake out any issues with truncation

[PATCH] D53586: Implement Function Multiversioning for Non-ELF Systems.

2018-10-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: echristo, rnk, aaron.ballman. erichkeane added a subscriber: mibintc. Similar to how ICC handles CPU-Dispatch on Windows, this patch uses the resolver function directly to forward the call to the proper function. This is not nearly as

[PATCH] D53482: Add clang-format stability check with FormatTests

2018-10-23 Thread Vladimir Glavnyy via Phabricator via cfe-commits
vglavnyy added a comment. @krasimir thank you for review. The patch code has been updated. I hope this patch will help to start to fix this issue. Probably will be helpful to add an optional debug flag will enable a twice-run checking for every run of clang-format.

[PATCH] D53558: Add gfx909 to GPU Arch

2018-10-23 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl added a comment. Are changes for https://github.com/llvm-mirror/clang/blob/master/lib/Basic/Targets/AMDGPU.cpp#L137 in a separate review? (I could not locate it). Repository: rC Clang https://reviews.llvm.org/D53558 ___ cfe-commits

[PATCH] D53339: [clang-tidy] Add the abseil-duration-factory-float check

2018-10-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. This revision is now accepted and ready to land. @alexfh you did comment before, do you want to add more? I have no issues left. Please give alex the opportunity to react, but if he doesn't (he has a lot to do) you can commit in 3

[PATCH] D53192: [clangd] Do not query index for new name completions.

2018-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 170678. kadircet added a comment. - Use new enum types. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53192 Files: clangd/CodeComplete.cpp clangd/index/SymbolCollector.cpp unittests/clangd/CodeCompleteTests.cpp Index:

[PATCH] D53191: [clang] Introduce new completion context types

2018-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 170677. kadircet marked 2 inline comments as done. kadircet added a comment. - Use Symol, SymbolOrNewName, NewName - Address comments. Repository: rC Clang https://reviews.llvm.org/D53191 Files: include/clang/Sema/CodeCompleteConsumer.h

[PATCH] D53308: [Fixed Point Arithmetic] Fixed Point to Boolean Cast

2018-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2026 +return EmitScalarConversion(Visit(E), E->getType(), DestTy, +

  1   2   >