Fix clang-format-vs to use characters position/count instead of the offset/length for Unicode Replacements

2018-10-20 Thread 김태석 via cfe-commits
Internally view.TextBuffer use sequence of Unicode characters encoded using UTF-16 and use characters position/count for manipulating text. When formatting an ANSI text, Replacements offset/length is same with position/count but not an Unicode. So conversion needed. #include #include int main

[PATCH] D53475: Create ConstantExpr class

2018-10-20 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 170325. Repository: rC Clang https://reviews.llvm.org/D53475 Files: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include/clang/AST/RecursiveASTVisitor.h include/clang/AST/StmtDataCollectors.td include/clang/Basic/StmtNodes.td include/clang

[PATCH] D53475: Create ConstantExpr class

2018-10-20 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 170324. void marked an inline comment as done. void added a comment. Create a "FullExpression" parent class and skip full expressions in all places we skip with ExprWithCleanups. Repository: rC Clang https://reviews.llvm.org/D53475 Files: include/clang/A

[PATCH] D45416: [AST, analyzer] Transform rvalue cast outputs to lvalues (fheinous-gnu-extensions)

2018-10-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344864: [AST, analyzer] Transform rvalue cast outputs to lvalues (fheinous-gnu… (authored by a.sidorin, committed by ). Herald added subscribers: llvm-commits, dkrupp, donat.nagy. Changed prior to commit:

r344864 - [AST, analyzer] Transform rvalue cast outputs to lvalues (fheinous-gnu-extensions)

2018-10-20 Thread Aleksei Sidorin via cfe-commits
Author: a.sidorin Date: Sat Oct 20 15:49:23 2018 New Revision: 344864 URL: http://llvm.org/viewvc/llvm-project?rev=344864&view=rev Log: [AST, analyzer] Transform rvalue cast outputs to lvalues (fheinous-gnu-extensions) Despite the fact that cast expressions return rvalues, GCC still handles such

[PATCH] D53475: Create ConstantExpr class

2018-10-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks fine as far as it goes, but we're going to need to change all the places that skip past ExprWithCleanups to also step over this node. Since both nodes represent the boundary of a particular kind of full-expression, it'd make sense to me for them to at least have a

[PATCH] D53475: Create ConstantExpr class

2018-10-20 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 170321. Repository: rC Clang https://reviews.llvm.org/D53475 Files: include/clang/AST/Expr.h include/clang/AST/RecursiveASTVisitor.h include/clang/AST/StmtDataCollectors.td include/clang/Basic/StmtNodes.td include/clang/Serialization/ASTBitCodes.h

[PATCH] D53475: Create ConstantExpr class

2018-10-20 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added a reviewer: rsmith. void added a project: clang. Herald added a subscriber: cfe-commits. A ConstantExpr class represents a full expression that's in a context where a constant expression is required. This class reflects the path the evaluator took to reach th

[PATCH] D53277: [analyzer][NFC] Collect all -analyzer-config options in a .def file

2018-10-20 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D53277#1269960, @NoQ wrote: > I think this is awesome o_o Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.def:386 + +ANALYZER_OPTION_WITH_FN(StringRef, ModelPath, "model-path", "", "", +

[PATCH] D53277: [analyzer][NFC] Collect all -analyzer-config options in a .def file

2018-10-20 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 170318. Szelethus added a comment. Removed doxygen comments, rebased to `D53276`. Please don't mind me saying this, but damn that's one pretty .def file compared to the mess that `AnalyzerOptions` currently is :). https://reviews.llvm.org/D53277 Files:

[PATCH] D53276: [analyzer][NFC] Fix some incorrect uses of -analyzer-config options

2018-10-20 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp:1401-1402 checker->IsAggressive = - mgr.getAnalyzerOptions().getBooleanOption("AggressiveReport", false); + mgr.getAnalyzerOptions().getBooleanOption("AggressiveReport",

[PATCH] D53276: [analyzer][NFC] Fix some incorrect uses of -analyzer-config options

2018-10-20 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 170315. Szelethus edited the summary of this revision. Szelethus added a comment. Herald added a subscriber: mgorny. Added two more fixes, and added this to the summary: - `lib/StaticAnalyzer/Checkers/AllocationDiagnostics.cpp` and `lib/StaticAnalyzer/Chec

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-10-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D53076#1261134, @NoQ wrote: > For example, in the `inline-plist.c`'s `bar()` on line 45, Static Analyzer > indeed doesn't assume that `p` is equal to null; instead, Static Analyzer > *knows* it for sure. Thanks you! This a great example wh

r344862 - [X86] Add more intrinsics to match icc.

2018-10-20 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sat Oct 20 12:28:52 2018 New Revision: 344862 URL: http://llvm.org/viewvc/llvm-project?rev=344862&view=rev Log: [X86] Add more intrinsics to match icc. This adds _mm_loadu_epi8, _mm256_loadu_epi8, _mm512_loadu_epi8 _mm_loadu_epi16, _mm256_loadu_epi16, _mm512_loadu_epi16 _mm_

r344861 - [X86] Add missing intrinsics to match icc.

2018-10-20 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sat Oct 20 12:28:50 2018 New Revision: 344861 URL: http://llvm.org/viewvc/llvm-project?rev=344861&view=rev Log: [X86] Add missing intrinsics to match icc. This adds _mm_and_epi32, _mm_and_epi64 _mm_andnot_epi32, _mm_andnot_epi64 _mm_or_epi32, _mm_or_epi64 _mm_xor_epi32, _mm_

r344859 - Use llvm::{all, any, none}_of instead std::{all, any, none}_of. NFC

2018-10-20 Thread Fangrui Song via cfe-commits
Author: maskray Date: Sat Oct 20 10:53:42 2018 New Revision: 344859 URL: http://llvm.org/viewvc/llvm-project?rev=344859&view=rev Log: Use llvm::{all,any,none}_of instead std::{all,any,none}_of. NFC Modified: cfe/trunk/lib/AST/VTableBuilder.cpp cfe/trunk/lib/ASTMatchers/ASTMatchersInternal

[clang-tools-extra] r344858 - [clangd] Fix unqualified make_unique after r344850. NFC

2018-10-20 Thread Sam McCall via cfe-commits
Author: sammccall Date: Sat Oct 20 10:40:12 2018 New Revision: 344858 URL: http://llvm.org/viewvc/llvm-project?rev=344858&view=rev Log: [clangd] Fix unqualified make_unique after r344850. NFC Modified: clang-tools-extra/trunk/clangd/index/dex/Dex.cpp Modified: clang-tools-extra/trunk/clangd/

[clang-tools-extra] r344856 - Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking

2018-10-20 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat Oct 20 10:35:50 2018 New Revision: 344856 URL: http://llvm.org/viewvc/llvm-project?rev=344856&view=rev Log: Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking whether it is too old. Modified: clang-tools-extra/trunk/unittests/clangd/JSONTransportT

r344847 - [NFC][Test commit] Fix typos in a comment

2018-10-20 Thread Aleksei Sidorin via cfe-commits
Author: a.sidorin Date: Sat Oct 20 07:47:37 2018 New Revision: 344847 URL: http://llvm.org/viewvc/llvm-project?rev=344847&view=rev Log: [NFC][Test commit] Fix typos in a comment Modified: cfe/trunk/lib/StaticAnalyzer/Core/CheckerManager.cpp Modified: cfe/trunk/lib/StaticAnalyzer/Core/Checke

[clang-tools-extra] r344845 - Fix MSVC "truncation from 'double' to 'float'" warning. NFCI.

2018-10-20 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Sat Oct 20 06:20:26 2018 New Revision: 344845 URL: http://llvm.org/viewvc/llvm-project?rev=344845&view=rev Log: Fix MSVC "truncation from 'double' to 'float'" warning. NFCI. Modified: clang-tools-extra/trunk/clangd/Quality.cpp Modified: clang-tools-extra/trunk/clangd/Qu

[clang-tools-extra] r344844 - Fix MSVC "not all control paths return a value" warning. NFCI.

2018-10-20 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Sat Oct 20 06:18:49 2018 New Revision: 344844 URL: http://llvm.org/viewvc/llvm-project?rev=344844&view=rev Log: Fix MSVC "not all control paths return a value" warning. NFCI. Modified: clang-tools-extra/trunk/clangd/index/FileIndex.cpp Modified: clang-tools-extra/trunk/

[PATCH] D53472: Add gfx904 and gfx906 to GPU Arch

2018-10-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a subscriber: jholewinski. https://reviews.llvm.org/D53472 Files: include/clang/Basic/Cuda.h lib/Basic/Cuda.cpp lib/Basic/Targets/NVPTX.cpp Index: lib/Basic/Targets/NVPTX.cpp =

[PATCH] D52857: Deprecate 'set output foo' API of clang-query

2018-10-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 170310. steveire added a comment. Don't deprecate existing API Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52857 Files: clang-query/Query.cpp clang-query/Query.h clang-query/QueryParser.cpp clang-query/QuerySession.h unittests

[PATCH] D52857: Deprecate 'set output foo' API of clang-query

2018-10-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Perhaps the best solution is to introduce this new API, but not deprecate the existing 'exclusive' API. What do you think? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52857 ___ cfe-commits mailing list

[PATCH] D52857: Deprecate 'set output foo' API of clang-query

2018-10-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 170308. steveire added a comment. Update test Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52857 Files: clang-query/Query.cpp clang-query/Query.h clang-query/QueryParser.cpp clang-query/QuerySession.h unittests/clang-query/Quer

[PATCH] D52859: [clang-query] Add option to print matcher expression

2018-10-20 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344840: [clang-query] Add option to print matcher expression (authored by steveire, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52859?vs=1

[clang-tools-extra] r344840 - [clang-query] Add option to print matcher expression

2018-10-20 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Sat Oct 20 02:13:59 2018 New Revision: 344840 URL: http://llvm.org/viewvc/llvm-project?rev=344840&view=rev Log: [clang-query] Add option to print matcher expression Summary: This is useful if using clang-query -f with a file containing multiple matchers. Reviewers: aaron.b

[PATCH] D52857: Deprecate 'set output foo' API of clang-query

2018-10-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 170306. steveire added a comment. Fix test Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52857 Files: clang-query/Query.cpp clang-query/Query.h clang-query/QueryParser.cpp clang-query/QuerySession.h unittests/clang-query/QueryEn

[PATCH] D52857: Deprecate 'set output foo' API of clang-query

2018-10-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 170305. steveire added a comment. Fix tests Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52857 Files: clang-query/Query.cpp clang-query/Query.h clang-query/QueryParser.cpp clang-query/QuerySession.h unittests/clang-query/QueryE

[PATCH] D52857: Deprecate 'set output foo' API of clang-query

2018-10-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 170304. steveire added a comment. Rename dump-output to ast-output. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52857 Files: clang-query/Query.cpp clang-query/Query.h clang-query/QueryParser.cpp clang-query/QuerySession.h unit

[PATCH] D53200: [OpenCL] Fix serialization of OpenCLExtensionDecls

2018-10-20 Thread Alexey Sachkov via Phabricator via cfe-commits
AlexeySachkov added inline comments. Comment at: test/Headers/opencl-pragma-extension-begin.cl:1 +// RUN: rm -rf %t +// RUN: mkdir -p %t Anastasia wrote: > I think the tests in this folder are for standard includes only but you are > testing custom include file

[PATCH] D53329: Generate DIFile with main program if source is not available

2018-10-20 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Sure. Let me provide a little bit more context and what I want to achieve: . I have a tool, called bcc (https://github.com/iovisor/bcc) which uses clang CompilerInvocation interface and MCJIT to generates BPF code and load into kernel . Several files (the m