Re: [clang-tools-extra] r330245 - [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-18 Thread Mikael Holmén via cfe-commits
Hi, On 04/18/2018 10:54 AM, Haojian Wu via cfe-commits wrote: Author: hokein Date: Wed Apr 18 01:54:28 2018 New Revision: 330245 URL: http://llvm.org/viewvc/llvm-project?rev=330245=rev Log: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file. Summary: Fix

[PATCH] D44670: [CXX] Templates specialization visibility can be wrong

2018-04-18 Thread Doug Gregor via Phabricator via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM, thanks Repository: rC Clang https://reviews.llvm.org/D44670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-04-18 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. Test files for `initialization` missing? : ) Repository: rC Clang https://reviews.llvm.org/D45774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r330305 - Fix test from r330245 on Windows.

2018-04-18 Thread Douglas Yung via cfe-commits
Author: dyung Date: Wed Apr 18 16:58:05 2018 New Revision: 330305 URL: http://llvm.org/viewvc/llvm-project?rev=330305=rev Log: Fix test from r330245 on Windows. Modified: clang-tools-extra/trunk/test/clang-tidy/read_file_config.cpp Modified:

r330304 - [CodeGen] Do not push a destructor cleanup for a struct that doesn't

2018-04-18 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Apr 18 16:33:15 2018 New Revision: 330304 URL: http://llvm.org/viewvc/llvm-project?rev=330304=rev Log: [CodeGen] Do not push a destructor cleanup for a struct that doesn't have a non-trivial destructor. This fixes a bug introduced in r328731 where CodeGen emits calls

r330303 - [MS] Fix unprototyped thunk emission for incomplete return types

2018-04-18 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Apr 18 16:21:32 2018 New Revision: 330303 URL: http://llvm.org/viewvc/llvm-project?rev=330303=rev Log: [MS] Fix unprototyped thunk emission for incomplete return types Fixes PR37161 Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-18 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 143025. Charusso marked an inline comment as done. Charusso added a comment. Everything fixed. Thanks you @lebedev.ri for the early comments, I forgot to submit my comment. https://reviews.llvm.org/D45050 Files:

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-18 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 14 inline comments as done. Charusso added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:226 +DiagnosticBuilder ) { + if (getLangOpts().CPlusPlus11) { +StringRef NewFuncName = (Name[0] != 'w') ? "strncpy_s" :

[PATCH] D45611: [analyzer] Fix filename in cross-file HTML report

2018-04-18 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich accepted this revision. vlad.tsyrklevich added a comment. This revision is now accepted and ready to land. This LGTM, but 1) you should add a test, probably just need to another CHECK to test/Coverage/html-multifile-diagnostics.c from https://reviews.llvm.org/D30406, and 2)

[PATCH] D45254: [X86][WAITPKG] WaitPKG intrinsics

2018-04-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Headers/waitpkgintrin.h:41 +static __inline__ __UINT8_TYPE__ __DEFAULT_FN_ATTRS +_umwait (__UINT32_TYPE__ __CONTROL, __UINT64_TYPE__ __COUNTER) +{ I think we should use "unsigned int" and "unsigned long long"

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Thank you for the contribution! Please update the documentation accordingly (http://clang.llvm.org/extra/clang-tidy/#testing-checks). > // RUN: %check_clang_tidy %s misc-unused-using-decls %t > -check_suffix=-FLAG_1-- I don't know whether it makes sense to endorse

[PATCH] D45223: [CUDA] Set LLVM calling convention for CUDA kernel

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D45223#1071452, @tra wrote: > AFAICT this is the replacement for https://reviews.llvm.org/D44747. LGTM. Yes. Thanks. https://reviews.llvm.org/D45223 ___ cfe-commits mailing list

[PATCH] D45068: [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma instructions.

2018-04-18 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330296: [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma… (authored by tra, committed by ). Changed prior to commit: https://reviews.llvm.org/D45068?vs=143003=143005#toc

r330296 - [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma instructions.

2018-04-18 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Apr 18 14:51:48 2018 New Revision: 330296 URL: http://llvm.org/viewvc/llvm-project?rev=330296=rev Log: [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma instructions. The new instructions were added added for sm_70+ GPUs in CUDA-9.1. Differential

[PATCH] D45068: [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma instructions.

2018-04-18 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 143003. tra added a comment. Updated the way we specify TARGET_BUILTIN feature constraints https://reviews.llvm.org/D45068 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/lib/CodeGen/CGBuiltin.cpp clang/lib/Driver/ToolChains/Cuda.cpp

[PATCH] D45720: [X86] Lowering PACK*S (pack with saturation) intrinsics to native IR (clang side)

2018-04-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D45720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45223: [CUDA] Set LLVM calling convention for CUDA kernel

2018-04-18 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. AFAICT this is the replacement for https://reviews.llvm.org/D44747. LGTM. https://reviews.llvm.org/D45223 ___ cfe-commits mailing list

[PATCH] D45223: [CUDA] Set LLVM calling convention for CUDA kernel

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 143001. yaxunl retitled this revision from "[CUDA] Fix overloading resolution failure due to kernel calling convention" to "[CUDA] Set LLVM calling convention for CUDA kernel". yaxunl edited the summary of this revision. yaxunl added a comment. Use CodeGen

[PATCH] D45223: [CUDA] Fix overloading resolution failure due to kernel calling convention

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D45223#1071358, @rjmccall wrote: > Yes, I'm sorry, I think you're right. I had misunderstood the language > problem when I suggested going down this road. In https://reviews.llvm.org/D45223#1071358, @rjmccall wrote: > Yes, I'm sorry, I

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/utils/ASTUtils.cpp:226 + + // If 'Exp' is bound to a non-const reference, check all declRefExpr to that. + const auto Refs = match( What about transitive references and pointers? It seems that only

[clang-tools-extra] r330286 - add extra acronyms for objc property names

2018-04-18 Thread Yan Zhang via cfe-commits
Author: wizard Date: Wed Apr 18 13:09:10 2018 New Revision: 330286 URL: http://llvm.org/viewvc/llvm-project?rev=330286=rev Log: add extra acronyms for objc property names Summary: This is to support general acronyms in Objective-C like 2G/3G/4G/... and coordinates X, Y, Z and W. Reviewers:

r330284 - [OPENMP] Fix -Wunused-lambda-capture. NFC

2018-04-18 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Apr 18 12:32:01 2018 New Revision: 330284 URL: http://llvm.org/viewvc/llvm-project?rev=330284=rev Log: [OPENMP] Fix -Wunused-lambda-capture. NFC Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp URL:

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 142991. JonasToth added a comment. - [Misc] mark false positives Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/ConstCheck.cpp

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @shuaiwang I implemented the check on top of you utility function. It does fail right now (concentrating on values only for now). I added a `FIXME` for all false positives/negatives for the values test cases. Repository: rCTE Clang Tools Extra

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 142988. JonasToth added a comment. - [Feature] refactor check to use a utility function to determine constness Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt

[PATCH] D45223: [CUDA] Fix overloading resolution failure due to kernel calling convention

2018-04-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Yes, I'm sorry, I think you're right. I had misunderstood the language problem when I suggested going down this road. https://reviews.llvm.org/D45223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45750: add extra acronyms for objc property names

2018-04-18 Thread Yan Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330286: add extra acronyms for objc property names (authored by Wizard, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D45750 Files:

[PATCH] D45750: add extra acronyms for objc property names

2018-04-18 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:42 constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = { +"[2-9]G", "ACL", benhamilton wrote: > Probably should just make this: > > "\\d+G" > It seems

[PATCH] D45750: add extra acronyms for objc property names

2018-04-18 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 142985. Wizard marked 2 inline comments as done. Wizard added a comment. resolve comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45750 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Another note: https://github.com/llvm-mirror/clang-tools-extra/blob/master/clang-tidy/utils/DeclRefExprUtils.cpp There is a `isOnlyUsedAsConst` with a slick implementation, using a set difference. Repository: rCTE Clang Tools Extra

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 142978. yaxunl marked an inline comment as done. yaxunl added a comment. Revised by Artem's comments. https://reviews.llvm.org/D44984 Files: include/clang/Basic/IdentifierTable.h include/clang/Basic/LangOptions.def

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 4 inline comments as done. yaxunl added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:466-467 Builder.defineMacro("__ASSEMBLER__"); if (LangOpts.CUDA) Builder.defineMacro("__CUDA__"); + if (LangOpts.HIP) tra wrote: >

[PATCH] D45783: [DEBUGINFO, NVPTX] Render `-no-cuda-debug` LLVM option when required.

2018-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: tra, jlebar, echristo. Herald added a subscriber: JDevlieghere. When emission of the lineinfo is requested for the NVPTX, render the LLVM `-no-cuda-debug` option to disable emission of the `debug` option in the `.target` directive. Required

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/utils/ASTUtils.h:31 + +enum ExprModificationKind { + EMK_NotModified, /// The Expr is neither modified nor escaped. Maybe you could add an `Unknown` kind, e.g. if the expression is not found or similar.

[PATCH] D45779: [ARM] Remove redundant #if in test

2018-04-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. This revision is now accepted and ready to land. LGTM; it's an obvious NFC patch. Repository: rC Clang https://reviews.llvm.org/D45779 ___ cfe-commits mailing list

r330280 - [CUDA] added missing __ldg(const signed char *)

2018-04-18 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Apr 18 11:33:43 2018 New Revision: 330280 URL: http://llvm.org/viewvc/llvm-project?rev=330280=rev Log: [CUDA] added missing __ldg(const signed char *) Differential Revision: https://reviews.llvm.org/D45780 Modified: cfe/trunk/lib/Headers/__clang_cuda_intrinsics.h

[PATCH] D45780: [CUDA] added missing __ldg(const signed char *)

2018-04-18 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330280: [CUDA] added missing __ldg(const signed char *) (authored by tra, committed by ). Changed prior to commit: https://reviews.llvm.org/D45780?vs=142970=142974#toc Repository: rC Clang

[PATCH] D45780: [CUDA] added missing __ldg(const signed char *)

2018-04-18 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: jlebar. Herald added a subscriber: sanjoy. Until now we only had variants for 'char' and 'unsigned char'. In C++ 'char' 'unsigned char' and 'signed char' are three different types and we need overloads for all of them.

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-04-18 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. With this patch we get ~1800 bytes improvement on one of our internal codebases. I also ran spec2000/spec2006 validations (for RISCV) and there were no regressions. There were also no code size improvements seen in spec. https://reviews.llvm.org/D39053

r330279 - [HIP] Add driver input type for HIP

2018-04-18 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Apr 18 11:25:03 2018 New Revision: 330279 URL: http://llvm.org/viewvc/llvm-project?rev=330279=rev Log: [HIP] Add driver input type for HIP Patch by Greg Rodgers. Revised by Yaxun Liu. Differential Revision: https://reviews.llvm.org/D45489 Modified:

[PATCH] D45489: [HIP] Add input type for HIP

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330279: [HIP] Add driver input type for HIP (authored by yaxunl, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45489?vs=141851=142972#toc

[PATCH] D45779: [ARM] Remove redundant #if in test

2018-04-18 Thread strager via Phabricator via cfe-commits
strager created this revision. strager added a reviewer: cfe-commits. Herald added subscribers: chrib, kristof.beyls, javed.absar. Both sides of this #if #include the same file. Drop the #if, leaving only the #include. This commit should not change behaviour. Repository: rC Clang

[PATCH] D45489: [HIP] Add input type for HIP

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D45489#1071177, @tra wrote: > In https://reviews.llvm.org/D45489#1071044, @yaxunl wrote: > > > In https://reviews.llvm.org/D45489#1070929, @yaxunl wrote: > > > > > In https://reviews.llvm.org/D45489#1070470, @tra wrote: > > > > > > > I'm

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I was thinking about that too. - We can extract all `DeclRefExpr` for the modifiying expressions and add dependencies. Such analysis is definitly interesting, but should maybe be added later. Having an internal `Expr` : `Modified?` mapping would suffice, too. The

[PATCH] D45489: [HIP] Add input type for HIP

2018-04-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In https://reviews.llvm.org/D45489#1071044, @yaxunl wrote: > In https://reviews.llvm.org/D45489#1070929, @yaxunl wrote: > > > In https://reviews.llvm.org/D45489#1070470, @tra wrote: > > > > > I'm getting confused about the order of the patches. > > > The patch stack

RE: r330244 - [MinGW] Look for a cross sysroot relative to the clang binary

2018-04-18 Thread Martin Storsjö via cfe-commits
Hi Douglas, I wasn't able to reproducd the issue myself, but I think I know what the issue was, and I committed a fix attempt. // Martin On Wed, 18 Apr 2018, Martin Storsjö via cfe-commits wrote: Hi Douglas, Yes, I saw it - trying to look into it right now. // Martin On Wed, 18 Apr

[PATCH] D44604: Make stdarg.h compatible with FreeBSD

2018-04-18 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. FWIW, I ended up fixing FreeBSD to only use in freestanding environments and always use in userland which makes this patch no longer necessary. (Only one place needed to be fixed.) Repository: rC Clang https://reviews.llvm.org/D44604

r330277 - [MinGW] Try to fix asan testing after r330244

2018-04-18 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Wed Apr 18 10:34:29 2018 New Revision: 330277 URL: http://llvm.org/viewvc/llvm-project?rev=330277=rev Log: [MinGW] Try to fix asan testing after r330244 Twines shouldn't be stored as they can refer to temporaries. Modified: cfe/trunk/lib/Driver/ToolChains/MinGW.cpp

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D45679#1071116, @JonasToth wrote: > You are doing a great job and i learn new stuff :) > > - What do you think about having these functions in a class? Now, we need to > recalculate and reanalyze the scope for every variable, multiple

[PATCH] D44670: [CXX] Templates specialization visibility can be wrong

2018-04-18 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added inline comments. Comment at: lib/AST/Decl.cpp:1078 +for (const auto *RD : + spec->getSpecializedTemplate()->getTemplatedDecl()->redecls()) { + auto Vis = getVisibilityOf(RD, kind); doug.gregor wrote: > Do we want to look at *all*

[PATCH] D44670: [CXX] Templates specialization visibility can be wrong

2018-04-18 Thread Steven Wu via Phabricator via cfe-commits
steven_wu updated this revision to Diff 142961. steven_wu added a comment. Address review feedback Repository: rC Clang https://reviews.llvm.org/D44670 Files: lib/AST/Decl.cpp test/CodeGenCXX/visibility-pr36810.cpp Index: test/CodeGenCXX/visibility-pr36810.cpp

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-04-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. >> OpenCV isn't clean either, here the results: >> >> Filter: >> `ASSERT*|ALL*|CAL*|CC*|CALC*|calc*|CL*|cl*|CUDA*|CV*|cv*|EXPECT*|GTEST*|FUNCTOR*|HAVE*|ICV*|IPL*|IPP*|ipp*|__itt*|ITT*|JAS*|jas*|MESSAGE*|MAX*|OCL*|opengl*|OPENCV*|TYP*` > > This one worries me a bit

[PATCH] D43689: [analyzer] Disable constructor inlining when lifetime extension through fields occurs.

2018-04-18 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. This change caused an assertion failure in ExprEngineCXX.cpp: https://bugs.llvm.org/show_bug.cgi?id=37166 Repository: rC Clang https://reviews.llvm.org/D43689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-18 Thread Brooks Moses via Phabricator via cfe-commits
brooksmoses added a comment. Thanks for the summary, John. To confirm, I found two examples of bugs involving local variables, as well as the field-based examples. And, indeed, all of the false positives were in unit tests. Repository: rC Clang https://reviews.llvm.org/D45685

[PATCH] D45777: [UnitTests] NFC/build-perf: Break up nontrivial compile jobs

2018-04-18 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki created this revision. davezarzycki added reviewers: arphaman, sberg, delesley, james.dennett, jdennett, klimek. Herald added a subscriber: mgorny. RecursiveASTVisitorTest.cpp is one of the longest compile jobs and a build bottleneck on many-core machines. This patch breaks that

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. You are doing a great job and i learn new stuff :) Inspired by the analysis tool in clangs repo: - What do you think about having these functions in a class? Now, we need to recalculate and reanalyze the scope for every variable, multiple times (reference tracking).

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-04-18 Thread James Chou via Phabricator via cfe-commits
uohcsemaj added a comment. ping @djasper can we make a decision here this patch? I would really like to use these new styles :( https://reviews.llvm.org/D40988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-18 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. The patch introduces a new command line option `-check_suffix` to allow multiple %check_clang_tidy% in tests. Sample: // RUN: %check_clang_tidy %s

[PATCH] D42581: [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices.

2018-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330272: [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices. (authored by ABataev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r330272 - [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices.

2018-04-18 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Apr 18 09:31:09 2018 New Revision: 330272 URL: http://llvm.org/viewvc/llvm-project?rev=330272=rev Log: [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices. Summary: NVPTX target supports debug info in DWARF-2 format. Patch adds emission of debug info in

RE: r330244 - [MinGW] Look for a cross sysroot relative to the clang binary

2018-04-18 Thread Martin Storsjö via cfe-commits
Hi Douglas, Yes, I saw it - trying to look into it right now. // Martin On Wed, 18 Apr 2018, douglas.y...@sony.com wrote: Hi Martin, Your commit is causing a few test failures on the PS4 Windows bot, can you take a look?

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-04-18 Thread Yunlian Jiang via Phabricator via cfe-commits
yunlian added a comment. ping? https://reviews.llvm.org/D44788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45489: [HIP] Add input type for HIP

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D45489#1070929, @yaxunl wrote: > In https://reviews.llvm.org/D45489#1070470, @tra wrote: > > > I'm getting confused about the order of the patches. > > The patch stack phabricator displays in this patch is different compared > > to the stack

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-04-18 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. Not sure how to proceed about these: - CXXDynamicCastExpr: I don't think evalCast would handle this correctly, does it? - ObjCBridgedCastExpr: I don't know ObjectiveC - CastKinds for floating point: Floats cannot yet be handled by the analyzer, right? Repository:

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-04-18 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl created this revision. r.stahl added reviewers: NoQ, dcoughlin, xazax.hun. Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet, mehdi_amini. Herald added a reviewer: george.karpenkov. - SValBuilder::getConstantVal stopped processing an initialization if there are

[PATCH] D45223: [CUDA] Fix overloading resolution failure due to kernel calling convention

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D45223#1056187, @rjmccall wrote: > I think the appropriate place to do this is in IsStandardConversion, > immediately after the call to ResolveAddressOfOverloadedFunction. You might > want to add a general utility for getting the

[PATCH] D45750: add extra acronyms for objc property names

2018-04-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added inline comments. This revision is now accepted and ready to land. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:42 constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = { +"[2-9]G", "ACL",

[PATCH] D45771: [Driver] Support for -save-stats in AddGoldPlugin.

2018-04-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: tejohnson, mehdi_amini, compnerd. Herald added a subscriber: emaste. fhahn added a dependency: D45531: [LTO] Add stats-file option to LTO/Config.h.. This patch updates AddGoldPlugin to pass stats-file to the Gold plugin, if -save-stats is

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Herald added a subscriber: jkorous. Comment at: clangd/FindSymbols.cpp:117 +} +auto Path = URI::resolve(*Uri); +if (!Path) { The current URI scheme (`file`, `test`) works fine without `HintPath` because they don't use

[PATCH] D45489: [HIP] Add input type for HIP

2018-04-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D45489#1070470, @tra wrote: > I'm getting confused about the order of the patches. > The patch stack phabricator displays in this patch is different compared to > the stack in https://reviews.llvm.org/D44984. Which one should I trust?

r330229 - [AAch64] Add the __ARM_FEATURE_DOTPROD macro definition

2018-04-18 Thread Junmo Park via cfe-commits
Author: flyingforyou Date: Tue Apr 17 15:38:40 2018 New Revision: 330229 URL: http://llvm.org/viewvc/llvm-project?rev=330229=rev Log: [AAch64] Add the __ARM_FEATURE_DOTPROD macro definition This matches what GCC does. https://github.com/gcc-mirror/gcc/blob/master/gcc/config/aarch64/aarch64-c.c

r330220 - [XRay] Add clang builtin for xray typed events.

2018-04-18 Thread Keith Wyss via cfe-commits
Author: kpw Date: Tue Apr 17 14:32:43 2018 New Revision: 330220 URL: http://llvm.org/viewvc/llvm-project?rev=330220=rev Log: [XRay] Add clang builtin for xray typed events. Summary: A clang builtin for xray typed events. Differs from __xray_customevent(...) by the presence of a type tag that is

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-18 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Thanks James! Repository: rL LLVM https://reviews.llvm.org/D45668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45112: [MS] Emit vftable thunks for functions with incomplete prototypes

2018-04-18 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. see https://bugs.llvm.org/show_bug.cgi?id=37161 "clang-cl triggers ASTContext::getASTRecordLayout Assertion `D && 'Cannot get layout of forward declarations!''" for what appears to be fallout from this change Repository: rL LLVM https://reviews.llvm.org/D45112

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-18 Thread James Greenhalgh via Phabricator via cfe-commits
jgreenhalgh added a comment. In https://reviews.llvm.org/D45668#1070878, @SjoerdMeijer wrote: > Thanks, and I am going to try to get some clarity on this doc issue. But > looks like it should be "ARMv7, ARMv8", as it used to be. Make sense to > comment on this in the commit message, if that's

[PATCH] D45569: [Sema] Disable built-in increment operator for bool in overload resolution in C++17

2018-04-18 Thread Jan Korous via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330254: [Sema] Disable built-in increment operator for bool in overload resolution in… (authored by jkorous, committed by ). Changed prior to commit:

r330254 - [Sema] Disable built-in increment operator for bool in overload resolution in C++17

2018-04-18 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Apr 18 06:38:39 2018 New Revision: 330254 URL: http://llvm.org/viewvc/llvm-project?rev=330254=rev Log: [Sema] Disable built-in increment operator for bool in overload resolution in C++17 Following: https://llvm.org/svn/llvm-project/cfe/trunk@329804 For C++17 the

RE: r330244 - [MinGW] Look for a cross sysroot relative to the clang binary

2018-04-18 Thread via cfe-commits
Hi Martin, Your commit is causing a few test failures on the PS4 Windows bot, can you take a look? http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/16544 Failing Tests (13): Clang :: CodeGenCXX/mingw-w64-exceptions.c Clang ::

[PATCH] D45454: Make __gcov_flush visible outside a shared library

2018-04-18 Thread Benoit Belley via Phabricator via cfe-commits
belleyb added a comment. @chh I had a chance to try out your proposed changes. It's not causing us any trouble. In fact, __gcov_flush() is not even used at all (at least in LLVM 5.0.1).. I can recompile llvm, compiler_rt and clang and re-run all the tests with __gcov_flush commented out! No

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-18 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Thanks, and I am going to try to get some clarity on this doc issue. But looks like it should be "ARMv7, ARMv8", as it used to be. Make sense to comment on this in the commit message, if that's what you mean. Repository: rL LLVM https://reviews.llvm.org/D45668

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-18 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig marked 2 inline comments as done. SimeonEhrig added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:358 + if (ModuleName.empty()) +ModuleName = ""; + rjmccall wrote: > This doesn't actually seem more useful than the empty string. We

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-18 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig updated this revision to Diff 142921. SimeonEhrig added a comment. Thank you everyone for your review comments! We addressed the inline comments and improved the description of the change set for clarity and context. Tests are updated as well. This now implements the same fix as

[PATCH] D45722: [X86] Lowering SAD (sum of absolute differences) intrinsics to native IR (clang side)

2018-04-18 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky updated this revision to Diff 142914. mike.dvoretsky added a comment. Updated per comments. https://reviews.llvm.org/D45722 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/avx2-builtins.c clang/test/CodeGen/avx512bw-builtins.c clang/test/CodeGen/sse2-builtins.c

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Let me try to summarize where I think we are. 1. I think it’s now generally agreed that this is a useful warning — certainly for field assignments, but we also have (at least?) one example with a local variable. 2. It’s also generally agreed that this warning has a

Re: [PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-18 Thread John McCall via cfe-commits
Let me try to summarize where I think we are. 1. I think it’s now generally agreed that this is a useful warning — certainly for field assignments, but we also have (at least?) one example with a local variable. 2. It’s also generally agreed that this warning has a problem with unit tests and

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: dblaikie, aaron.ballman, thakis, rjmccall, rsmith. It seems there isn't much enthusiasm for `-wtest` https://reviews.llvm.org/D45685. This is more conservative version, which i had in the very first revision of

[PATCH] D45764: [clangd][tests] Fix delimiter handling

2018-04-18 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a reviewer: sammccall. jkorous added a comment. Hi Sam, could you please take a look at this minor fix? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45763: [clangd][tests] Fix handling of EOF in delimited input

2018-04-18 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a reviewer: sammccall. jkorous added a comment. Hi Sam, could you please take a look at this minor fix? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45764: [clangd][tests] Fix delimiter handling

2018-04-18 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added a project: clang-tools-extra. Herald added subscribers: cfe-commits, MaskRay, ioeric, jkorous-apple, ilya-biryukov. Empty line shouldn't be considered a delimiter. Following https://reviews.llvm.org/D45763 Repository: rCTE Clang Tools Extra

[PATCH] D45763: [clangd][tests] Fix handling of EOF in delimited input

2018-04-18 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added a project: clang-tools-extra. Herald added subscribers: cfe-commits, MaskRay, ioeric, jkorous-apple, ilya-biryukov. Request in delimited input ended by EOF shouldn't be an error state. Comments should be allowed at the end of test files. Input

[PATCH] D45254: [X86][WAITPKG] WaitPKG intrinsics

2018-04-18 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 142913. https://reviews.llvm.org/D45254 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/Headers/waitpkgintrin.h

[PATCH] D45254: [X86][WAITPKG] WaitPKG intrinsics

2018-04-18 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 142910. GBuella added a comment. Modified the intrinsic. https://reviews.llvm.org/D45254 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists.txt

r330248 - Revert r330195 "[NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only".

2018-04-18 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Wed Apr 18 05:02:49 2018 New Revision: 330248 URL: http://llvm.org/viewvc/llvm-project?rev=330248=rev Log: Revert r330195 "[NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only". Differential Revision: https://reviews.llvm.org/D45668 Modified:

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'm sorry, that warning *is* in self-assign, although I'm not sure it should be. Repository: rC Clang https://reviews.llvm.org/D45685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The goal of having a unified option is that you can uniformly suppress warnings that don't always make sense in unit tests. It's future-proofing against the addition of other warnings (probably C++ warnings) that might not make sense for unit tests, like extending

[PATCH] D41897: Fixing a crash in Sema.

2018-04-18 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple closed this revision. jkorous-apple added a comment. Landed as git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322438 91177308-0d34-0410-b5e6-96231b3b80d8 https://reviews.llvm.org/D41897 ___ cfe-commits mailing list

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-18 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. Sure, will do. Should we treat these intrinsics as ARMv8 or ARMv7/v8? Also, would you mind if I commit a comment under this differential revision explaining the situation? Repository: rL LLVM https://reviews.llvm.org/D45668

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-18 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Sorry, I have second thoughts on this. This seems more like a doc issue than anything else. There is no reason why this could not be supported in A32. GCC is also supporting this, and removing it is a bit user unfriendly. Would you mind reverting this?

[PATCH] D45720: [X86] Lowering PACK*S (pack with saturation) intrinsics to native IR (clang side)

2018-04-18 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky updated this revision to Diff 142899. mike.dvoretsky added a comment. Updated per comments. https://reviews.llvm.org/D45720 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/avx2-builtins.c clang/test/CodeGen/avx512bw-builtins.c

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330245: [clang-tidy] Fix clang-tidy doesnt read .clangtidy configuration file. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

  1   2   >