[PATCH] D64632: [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

2019-07-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:7030-7032 + // Make sure that we do not mistake a call to the Objective-C method named + // "class" inside an array literal as attributes. + verifyFormat("@[ [NSArray class] ];");

[PATCH] D64600: [ObjC] Add an attribute that "clamps" signed char BOOLs to {0,1}

2019-07-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3279 +def ObjCClampingBool : TypeAttr { + let Spellings = [Clang<"objc_clamping_bool">]; + let Subjects = SubjectList<[TypedefName]>; Is there a desire for similar functionality

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. A qualifier "outside" the block-pointer type is telling you what address space the object which holds the block pointer is in, which is a completely different thing. Instead of `__global int (^block4)(void) = ^{ return 0; };`, you need to write `int (^__global block4)

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D64083#1583109 , @rjmccall wrote: > Okay, so it sounds like *from the language perspective* all block pointers > are actually pointers into `__generic`, and the thing with literals is just > an implementation detail that's be

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209532. Nathan-Huckleberry added a comment. - Add auto redirect and remove alpha checkers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 Files: clang-too

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum updated this revision to Diff 209535. quantum added a comment. Guard `__wasm_init_tls` and TLS globals behind a flag (currently `--shared-memory`). @tlively and I discussed offline and agreed that it's probably best to use the existing flag instead of adding another flag that needs to b

[PATCH] D63663: [clang-doc] Add html links to references

2019-07-12 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 209534. DiegoAstiazaran edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63663/new/ https://reviews.llvm.org/D63663 Files: clang-tools-extra/clang-doc/BitcodeReader.cpp clang-tools-extra/clang-doc/Bitcode

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum marked 4 inline comments as done. quantum added inline comments. Comment at: lld/wasm/Writer.cpp:629 + // Merge .tbss into .tdata so that they share the same offsets. + if (name.startswith(".tbss.")) +return ".tdata"; sbc100 wrote: > Maybe write thi

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-07-12 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. @martong Sorry for the delay, feel free to ping me in the future about these patches. I'll review them ASAP now that I'm back in office, so these delay's hopefully won't happen again. I tried applying this patch and it seems it needs to be rebased. I would do it myse

[PATCH] D62888: [NewPM] Port Sancov

2019-07-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:1022-1026 +SanitizerCoverage::getSectionStart(const std::string &Section) const { + return getSectionStartImpl(TargetTrip

r365933 - [SystemZ] Add support for new cpu architecture - arch13

2019-07-12 Thread Ulrich Weigand via cfe-commits
Author: uweigand Date: Fri Jul 12 11:14:51 2019 New Revision: 365933 URL: http://llvm.org/viewvc/llvm-project?rev=365933&view=rev Log: [SystemZ] Add support for new cpu architecture - arch13 This patch series adds support for the next-generation arch13 CPU architecture to the SystemZ backend. Th

[PATCH] D64651: [Driver] Support file paths with -ccc-gcc-name

2019-07-12 Thread Alex James via Phabricator via cfe-commits
al3xtjames created this revision. al3xtjames added a reviewer: llvm-commits. Herald added a project: clang. Herald added a subscriber: cfe-commits. When a file path is specified for gcc-name, don't prepend the target triple. This allows -target and -ccc-gcc-name to be used together when a file pat

r365935 - [WebAssembly] Make pthread imply bulk-memory, mutable-globals

2019-07-12 Thread Thomas Lively via cfe-commits
Author: tlively Date: Fri Jul 12 11:23:13 2019 New Revision: 365935 URL: http://llvm.org/viewvc/llvm-project?rev=365935&view=rev Log: [WebAssembly] Make pthread imply bulk-memory, mutable-globals Summary: This paves the way for using passive segments in pthread builds, which will make separate me

[PATCH] D64586: [WebAssembly] Make pthread imply bulk-memory, mutable-globals

2019-07-12 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365935: [WebAssembly] Make pthread imply bulk-memory, mutable-globals (authored by tlively, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64653: clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target

2019-07-12 Thread James Nagurne via Phabricator via cfe-commits
JamesNagurne created this revision. JamesNagurne added a reviewer: MaskRay. Herald added a project: clang. Herald added a subscriber: cfe-commits. test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target In revision rL365872 , a line containing '-targe

[clang-tools-extra] r365937 - [clang-doc] Add html links to references

2019-07-12 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Fri Jul 12 11:32:00 2019 New Revision: 365937 URL: http://llvm.org/viewvc/llvm-project?rev=365937&view=rev Log: [clang-doc] Add html links to references tags are added for the parents and members of records and return type and params of functions. The link redirects to

[PATCH] D63663: [clang-doc] Add html links to references

2019-07-12 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365937: [clang-doc] Add html links to references (authored by juliehockett, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D56353: Replace cc1 options '-mdisable-fp-elim' and '-momit-leaf-frame-pointer' with'-mframe-pointer='

2019-07-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 209550. ychen added a comment. - rebase after D64294 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56353/new/ https://reviews.llvm.org/D56353 Files: clang/include/clang/Basic

[PATCH] D64062: Remove __VERSION__

2019-07-12 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. lgtm, minor changes Comment at: docs/ReleaseNotes.rst:82 +Removed Compiler Options + I guess move the bullet to the generic "list of chan

[PATCH] D64655: [Clang][Driver] don't error for unsupported as options for -no-integrates-as

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. The Linux kernel's assembler flag detection started failing after r365703. It seems that Clang was erroring for -Wa, flags that it did not support (

[PATCH] D64527: driver: Don't warn about assembler flags being unused when not assembling

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Fixup: https://reviews.llvm.org/D64655 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64527/new/ https://reviews.llvm.org/D64527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Øystein Dale via Phabricator via cfe-commits
oydale created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A placeholder instruction for use in generation of cleanup code for an initializer list would not be emitted if the base class contained a non-trivial destructor and the class contains no fields of

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh, yes, it definitely can't be done to class types. I suppose we should just forget about it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62584/new/ https://reviews.llvm.org/D62584 ___ cfe-commits mailing list

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-12 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. Okay. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64400/new/ https://reviews.llvm.org/D64400 ___ cfe-commits mailing list cfe-comm

[PATCH] D62960: Add SVE opaque built-in types

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Seems reasonable to me. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62960/new/ https://reviews.llvm.org/D62960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum updated this revision to Diff 209560. quantum marked an inline comment as done. quantum added a comment. Switch to using ISelDAGToDAG instead of ISelLowering Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64537/new/ https://reviews.llvm.org/

[PATCH] D64607: [clang-tidy] Fix crash on end location inside macro

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Thanks for the fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64607/new/ https://reviews.llvm.org/D64607 __

[PATCH] D64569: [OpenCL] Improve destructor support in C++ for OpenCL

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:2016 CGF.EmitCXXDestructorCall(dtor, Dtor_Complete, /*for vbase*/ false, -/*Delegating=*/false, addr); +/*Delegating=*/false, addr, type); } -

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64656/new/ https://reviews.llvm.org/D64656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExprAgg.cpp:1627 +llvm::Constant::getNullValue(CGF.Int8PtrTy), +CharUnits::One()); // placeholder + Please declare a lambda to add a cleanup which implicitly creates this dominator a

[PATCH] D64655: [Clang][Driver] don't error for unsupported as options for -no-integrates-as

2019-07-12 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. s/integrates/integrated in the title, but otherwise this looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64655/new/ https://reviews.llvm.org/D64655 ___ cfe-commits ma

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum updated this revision to Diff 209566. quantum added a comment. Don't show a crash report for incorrect flags to use TLS Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64537/new/ https://reviews.llvm.org/D64537 Files: clang/include/clang/B

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 209565. ahatanak marked an inline comment as done. ahatanak added a comment. Diagnose C union globals that are non-trivial to default-initialize. Add 3 bits to RecordDeclBitfields for default-initialize, destruct, and copy to fast-path checking. Repositor

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12053 +NTCUC_UninitAutoVar); } + rjmccall wrote: > ahatanak wrote: > > rjmccall wrote: > > > Please add a comment explaining why this is specific to local variables

r365947 - Reland [clang] DirectoryWatcher

2019-07-12 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Jul 12 12:47:55 2019 New Revision: 365947 URL: http://llvm.org/viewvc/llvm-project?rev=365947&view=rev Log: Reland [clang] DirectoryWatcher This reverts commit abce8c457dd3de6b156756e547cc0eefb7653c79. + Fix the build for platforms that don't have DW implementated. Add

r365948 - Revert "Reland [clang] DirectoryWatcher"

2019-07-12 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Jul 12 12:54:36 2019 New Revision: 365948 URL: http://llvm.org/viewvc/llvm-project?rev=365948&view=rev Log: Revert "Reland [clang] DirectoryWatcher" This reverts commit fdcb7f47e783933e0af8a5fae91132269a208268. Removed: cfe/trunk/include/clang/DirectoryWatcher/

[PATCH] D64308: [clangd] Implement typeHierarchy/resolve for subtypes

2019-07-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/trunk/clangd/unittests/TypeHierarchyTests.cpp:629 + AST, Source.point(), /*ResolveLevels=*/1, + TypeHierarchyDirection::Children, Index.get(), "/clangd-test/TestTU.cpp"); + ASSERT_TRUE(bool(Result)); -

[PATCH] D64308: [clangd] Implement typeHierarchy/resolve for subtypes

2019-07-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (Thanks for writing the test, and sorry for the hassle it caused!) Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64308/new/ https://reviews.llvm.org/D64308 ___ cfe-commits mailing list cfe-c

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-07-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/Frontend/rewrite-includes-conditions.c:17 +line4 +#elif value2 < value2 +line5 Did you mean for this to be `value1 < value2` rather than `value2 < value2`? Comment at: clang/test/Frontend/rew

[PATCH] D64537: [WebAssembly] Implement thread-local storage (local-exec model)

2019-07-12 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum added a comment. @sbc100 As for `__tls_base` being immutable, I am not sure how this will interact with dynamic linking once we implement it. On native platforms, `dlopen`ed libraries have their TLS blocks allocated on first use. What exactly happens to `dlopen`ed libraries when there a

r365954 - Reland [clang] DirectoryWatcher

2019-07-12 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Jul 12 13:34:10 2019 New Revision: 365954 URL: http://llvm.org/viewvc/llvm-project?rev=365954&view=rev Log: Reland [clang] DirectoryWatcher This reverts commit f561227d133224d2d6a5a016abe4be051fa75501. - DirectoryWatcher - Fix the build for platforms that don't have DW

[clang-tools-extra] r365955 - [clangd] Fix off-by-one in CodeComplete and assertion in Dex

2019-07-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jul 12 13:35:41 2019 New Revision: 365955 URL: http://llvm.org/viewvc/llvm-project?rev=365955&view=rev Log: [clangd] Fix off-by-one in CodeComplete and assertion in Dex Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp clang-tools-extra/trunk/clangd/ind

[PATCH] D64169: ARM MTE stack sanitizer.

2019-07-12 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis updated this revision to Diff 209578. eugenis marked 4 inline comments as done. eugenis added a comment. addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64169/new/ https://reviews.llvm.org/D64169 Files: clang/incl

[PATCH] D64655: [Clang][Driver] don't error for unsupported as options for -no-integrated-as

2019-07-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I don't think this is the right fix, because now I think we get this behavior that we don't want: $ clang -E t.c -o t.i -Wa,-mbig-obj # no warning $ clang -E t.c -o t.i -Wa,-mbig-obj -fno-integrated-as clang: warning: argument unused during compilation: '-Wa,-mbig-ob

r365956 - Revert driver: Don't warn about assembler flags being unused when not assembling

2019-07-12 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Jul 12 13:44:57 2019 New Revision: 365956 URL: http://llvm.org/viewvc/llvm-project?rev=365956&view=rev Log: Revert driver: Don't warn about assembler flags being unused when not assembling This reverts r365703 (git commit 101c1afdfd1c88f05da94c6fd317b489bb704f40) and r365714

[PATCH] D64655: [Clang][Driver] don't error for unsupported as options for -no-integrated-as

2019-07-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I reverted @thakis's change in rC365956 , but I think in retrospect I should've just stamped your change. I was glazing over the "Integrated" part of "CollectArgsForIntegratedAssembler". Anyway, I think we should leave it alone and let him

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Øystein Dale via Phabricator via cfe-commits
oydale updated this revision to Diff 209584. oydale added a comment. Added regression test based on code in bug report Moved logic to a lambda Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64656/new/ https://reviews.llvm.org/D64656 Files: clang/

RE: [clang-tools-extra] r365937 - [clang-doc] Add html links to references

2019-07-12 Thread via cfe-commits
Hi Diego and Julie, The tests you modified, emitFunctionHTML and emitRecordHTML are failing when run on Windows due to path separator differences. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/26925 FAIL: Extra Tools Unit Tests :: clang-doc/./ClangDo

[PATCH] D64624: [clangd] Added highlighting to enum constants.

2019-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:257 + case HighlightingKind::EnumConstant: +return "constant.other.enum.cpp"; case HighlightingKind:

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Øystein Dale via Phabricator via cfe-commits
oydale updated this revision to Diff 209585. oydale added a comment. Reduce test case to a single execution with -O1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64656/new/ https://reviews.llvm.org/D64656 Files: clang/lib/CodeGen/CGExprAgg.cpp

[PATCH] D64169: ARM MTE stack sanitizer.

2019-07-12 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:28 + if (!CGM.getLangOpts().Sanitize.hasOneOf( + SanitizerKind::Address | SanitizerKind::KernelAddress | + SanitizerKind::HWAddress | SanitizerKind::KernelHWAddress | ---

[PATCH] D64617: [clangd] Added highlighting for members and methods

2019-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.h:28 Variable = 0, + Field, Function, nit: put it `Field` around `Class`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp:4-24 +struct outer +{ +struct inner +{ +~inner() {} +}; + Please use a more minimal testcase, such as: ``` struct P { ~P(); }; struct Q

[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists

2019-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:36 +// must be deduplicated. +std::sort(Tokens.begin(), Tokens.end()); +for (unsigned I = 1; I < Tokens.size(); ++I) { nit: we could write it like ``` llvm::s

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp:1 +// RUN: %clang_cc1 -emit-obj --std=c++17 -fcxx-exceptions -fexceptions -O1 %s +// CHECK no crash Why do you need `-O1`? Comment at

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan created this revision. ziangwan added reviewers: kongyi, pirama, rsmith, nickdesaulniers. Herald added subscribers: cfe-commits, jdoerfert, jfb, mgrang, javed.absar. Herald added a project: clang. These code: long i = L; float a = L: float b = a + i; Will n

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I think you want to default-ignore the "may lose precision" warnings, but not the ones that you know always lose precision. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 _

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. You have patch.patch in the diff above. You should drop that. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 ___ cfe-commits mailing list cfe-commits

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan updated this revision to Diff 209591. ziangwan added a comment. Removed patch.patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Driver/ToolChains/Arch/AArch64.cp

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. You can check also https://reviews.llvm.org/D52835. I hit there issue which I didn't know how to solve. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 ___ cfe-commits mail

[PATCH] D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types

2019-07-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added subscribers: aaron.ballman, rsmith. rsmith added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2773 + let Args = [TypeArgument<"DerefType", /*opt=*/1>]; + let MeaningfulToClassTemplateDefinition = 1; let Documentation = [LifetimeOwnerDocs];

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for the patch @ziangwan ! Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3245 +def warn_impcast_integer_float_precision : Warning< + "implicit conversion from %0 to %1 may loses integer precision">, + InGroup, DefaultIgnor

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Eino-Ville Talvala via Phabricator via cfe-commits
etalvala added inline comments. Comment at: clang/test/Sema/implicit-float-conversion.c:29 + double e = 0.0; + double f = i + e; +} should this also test the case of: ` long g = L; long h = g + a; ` or is that unlikely to fail if the assignment-to-f

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. I also recommend re-titling the commit to something like: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666

[PATCH] D64666: Allow Clang -Wconversion, -Wimplicit-float-conversion warns about integer type -> floating point type implicit conversion precision loss.

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan added a comment. In D64666#1583633 , @xbolva00 wrote: > You can check also https://reviews.llvm.org/D52835. I hit there issue which I > didn't know how to solve. Hi David, I have read your patch. I think that integer-to-floating-point conversi

r365962 - Remove __VERSION__

2019-07-12 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Fri Jul 12 14:45:08 2019 New Revision: 365962 URL: http://llvm.org/viewvc/llvm-project?rev=365962&view=rev Log: Remove __VERSION__ Summary: It has been introduced in 2011 for gcc compat: https://github.com/llvm-mirror/clang/commit/ad1a4c6e89594e704775ddb6b036ac982fd68cad i

[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365962: Remove __VERSION__ (authored by sylvestre, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D64062?vs=2094

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Øystein Dale via Phabricator via cfe-commits
oydale marked 2 inline comments as done. oydale added inline comments. Comment at: clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp:1 +// RUN: %clang_cc1 -emit-obj --std=c++17 -fcxx-exceptions -fexceptions -O1 %s +// CHECK no crash lebedev.ri wrote

[PATCH] D64600: [ObjC] Add an attribute that "clamps" signed char BOOLs to {0,1}

2019-07-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3279 +def ObjCClampingBool : TypeAttr { + let Spellings = [Clang<"objc_clamping_bool">]; + let Subjects = SubjectList<[TypedefName]>; aaron.ballman wrote: > Is there a desire f

[PATCH] D64600: [ObjC] Add an attribute that "clamps" signed char BOOLs to {0,1}

2019-07-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 209603. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64600/new/ https://reviews.llvm.org/D64600 Files: clang/include/clang/Basic/

[PATCH] D64669: [clang-doc] Fix failing tests on Windows

2019-07-12 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran created this revision. DiegoAstiazaran added reviewers: juliehockett, jakehehrlich, lebedev.ri. DiegoAstiazaran added a project: clang-tools-extra. Tests on Windows were failing due to path separator differences. '/' was being used as separator in the expected output, paths in exp

[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Thanks @rnk :) Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64062/new/ https://reviews.llvm.org/D64062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan updated this revision to Diff 209611. ziangwan added a comment. Fix spelling / comment / naming issues. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64666/new/ https://reviews.llvm.org/D64666 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Driver/ToolCha

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp:2 +// RUN: %clang_cc1 -emit-obj --std=c++17 -fcxx-exceptions -fexceptions -O1 %s +// CHECK no crash + oydale wrote: > lebedev.ri wrote: > > Either add miss

[PATCH] D64669: [clang-doc] Fix failing tests on Windows

2019-07-12 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett accepted this revision. juliehockett added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64669/new/ https://reviews.llvm.org/D64669 ___ cfe-commits mailing list c

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan marked 6 inline comments as done. ziangwan added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3245 +def warn_impcast_integer_float_precision : Warning< + "implicit conversion from %0 to %1 may loses integer precision">, + InGroup, Defau

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh, I see you've already answered that. I think it's fine to just leave this testing debug output if generated optimized output doesn't affect it; the bulk of our regression testing is with assertions-enabled compilers anyway. Repository: rG LLVM Github Monorepo C

[PATCH] D64671: New clang-tidy check: misc-init-local-variables

2019-07-12 Thread Jussi Pakkanen via Phabricator via cfe-commits
jpakkane created this revision. jpakkane added a reviewer: alexfh. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. This checks finds all primitive type local variables (integers, doubles, pointers) that are declared without an initial value. Includes fixit functiona

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Øystein Dale via Phabricator via cfe-commits
oydale marked an inline comment as done. oydale added inline comments. Comment at: clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp:2 +// RUN: %clang_cc1 -emit-obj --std=c++17 -fcxx-exceptions -fexceptions -O1 %s +// CHECK no crash + rjmccall wrote

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan marked 2 inline comments as done. ziangwan added inline comments. Comment at: clang/test/Sema/implicit-float-conversion.c:29 + double e = 0.0; + double f = i + e; +} etalvala wrote: > should this also test the case of: > ` > long g = L; > l

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D64666#1583667 , @ziangwan wrote: > In D64666#1583633 , @xbolva00 wrote: > > > You can check also https://reviews.llvm.org/D52835. I hit there issue which > > I didn't know how to solve

[PATCH] D64672: [X86] Prevent passing vectors of __int128 as in llvm IR

2019-07-12 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: eli.friedman, RKSimon, spatel, rnk. As far as I can tell, gcc passes 256/512 bit vectors __int128 in memory. And passes a vector of 1 _int128 in an xmm register. The backend considers as an illegal type and will scalarize any argu

r365966 - [DirectoryWatcher][linux] Fix use of uninitialized value

2019-07-12 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Jul 12 15:11:43 2019 New Revision: 365966 URL: http://llvm.org/viewvc/llvm-project?rev=365966&view=rev Log: [DirectoryWatcher][linux] Fix use of uninitialized value Modified: cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp Modified: cfe/trunk/lib/Dir

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:11430 +SmallString<32> PrettyTargetValue; +TargetFloatValue.toString(PrettyTargetValue, + TargetPrecision); Can you check my older patch + tests + discussion? I

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, just a few minor comment requests now. Comment at: include/clang/AST/DeclBase.h:1453 +/// copy. +uint64_t HasNonTrivialToPrimitiveCopyCUnion : 1; + Please include in these comments that these imply the associated basic

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3245 +def warn_impcast_integer_float_precision : Warning< + "implicit conversion from %0 to %1 may loses integer precision">, + InGroup, DefaultIgnore; ziangwan

[clang-tools-extra] r365967 - [clang-doc] Fix failing tests on Windows

2019-07-12 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Fri Jul 12 15:19:02 2019 New Revision: 365967 URL: http://llvm.org/viewvc/llvm-project?rev=365967&view=rev Log: [clang-doc] Fix failing tests on Windows Tests on Windows were failing due to path separator differences. '/' was being used as separator in the expected outp

[PATCH] D64669: [clang-doc] Fix failing tests on Windows

2019-07-12 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365967: [clang-doc] Fix failing tests on Windows (authored by juliehockett, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D64671: New clang-tidy check: misc-init-local-variables

2019-07-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. This certainly needs more tests: macros, `-x C`, ??? Comment at: clang-tools-extra/clang-tidy/misc/InitLocalVariablesCheck.cpp:26-29 + if(!MatchedDecl->isLocalVarDecl()) +return; + if(MatchedDecl->hasInit()) +return; Can ma

[PATCH] D64600: [ObjC] Add an attribute that "clamps" signed char BOOLs to {0,1}

2019-07-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3279 +def ObjCClampingBool : TypeAttr { + let Spellings = [Clang<"objc_clamping_bool">]; + let Subjects = SubjectList<[TypedefName]>; erik.pilkington wrote: > aaron.ballman wrote: >

r365968 - [DirectoryWatcher][NFC] Silence warnings in release build

2019-07-12 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Jul 12 15:25:17 2019 New Revision: 365968 URL: http://llvm.org/viewvc/llvm-project?rev=365968&view=rev Log: [DirectoryWatcher][NFC] Silence warnings in release build Modified: cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp cfe/trunk/unittests/Dir

r365969 - NFC: utils/perf-training: Python 3 compatibility for lit.cfg

2019-07-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Jul 12 15:29:44 2019 New Revision: 365969 URL: http://llvm.org/viewvc/llvm-project?rev=365969&view=rev Log: NFC: utils/perf-training: Python 3 compatibility for lit.cfg The output of subprocess.check_output is now bytes. We need to decode it. Modified: cfe/trunk/ut

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 209622. ahatanak marked 3 inline comments as done. ahatanak added a comment. Improve comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63753/new/ https://reviews.llvm.org/D63753 Files: include/clang/AST/Decl.h inc

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 209626. ahatanak added a comment. In Type.h, move method declarations down and mention that the predicates imply the associated basic non-triviality predicates. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63753/new/ https

[PATCH] D64646: [OPENMP]Add support for analysis of if clauses.

2019-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks great! Thank you for improving the tests even further. Comment at: test/Analysis/cfg-openmp.cpp:58-67 #pragma omp distribute simd for (int i = 0; i < 10; ++i) argc =

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added reviewers: glider, jfb. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Not rely a review, but removing this code I see slight improvements in binary size on CTMark. Looks like with "ptr" patches MemCpyOptPass is

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 Thread Øystein Dale via Phabricator via cfe-commits
oydale updated this revision to Diff 209627. oydale added a comment. Minimized test case further, removed misleading CHECK from comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64656/new/ https://reviews.llvm.org/D64656 Files: clang/lib/Cod

[PATCH] D64676: Support __seg_fs and __seg_gs on x86

2019-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. Herald added subscribers: cfe-commits, dexonsmith, jkorous. Herald added a project: clang. GCC supports named address spaces macros: https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html clang does as well with address spaces: https://clang.llvm.org/docs/L

[PATCH] D64656: Ensure placeholder instruction for cleanup is created

2019-07-12 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64656/new/ https://reviews.llvm.org/D64656 ___

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-12 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. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63753/new/ https://reviews.llvm.org/D63753 ___ cfe-com

<    1   2   3   >