[PATCH] D21767: Fix instantiation of friend function templates

2018-08-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 160290. sepavloff added a comment. Rebased the patch, it is still actual. Repository: rC Clang https://reviews.llvm.org/D21767 Files: include/clang/AST/ASTLambda.h include/clang/AST/Decl.h include/clang/Sema/Sema.h lib/AST/Decl.cpp lib/Sema/S

[PATCH] D21508: Diagnose friend function template redefinitions

2018-08-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 160298. sepavloff added a comment. Rebased the patch Repository: rC Clang https://reviews.llvm.org/D21508 Files: include/clang/AST/DeclBase.h lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/Modules/friend-definition.cpp te

[PATCH] D21767: Fix instantiation of friend function templates

2018-08-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In https://reviews.llvm.org/D21767#1197783, @rjmccall wrote: > Shouldn't there just be a link in the AST from the instantiated > `FunctionTemplateDecl ` back to the original pattern? Maybe a generalization > of `InstantiatedFromMember` in `RedeclarablableTemplateDecl

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-08 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 145735. sepavloff added a comment. Added treatment of structures/unions Repository: rC Clang https://reviews.llvm.org/D46241 Files: include/clang/AST/Expr.h lib/AST/ExprConstant.cpp lib/CodeGen/CGExprConstant.cpp test/CodeGen/const-init.c tes

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-08 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. > Hmm. In C++, a static object which isn't constant-initialized is > zero-initialized, which is required to set any padding bits to zero (N4640 > [dcl.init]p6) in both structs and unions. In C, a static object which doesn't > have an initializer also has all any paddi

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-10 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 146091. sepavloff added a comment. Updated patch Try evaluating initializer value only if the initializer type is integral or pointer. It avoids calculation of large value, which then is discarded. Repository: rC Clang https://reviews.llvm.org/D46241

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-10 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1414-1415 +Expr::EvalResult Result; +if (Init->EvaluateAsRValue(Result, CE.CGM.getContext()) && +!Result.hasUnacceptableSideEffect(Expr::SE_NoSideEffects)) + return (Result.Val.isInt(

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. @rsmith Do yo think this patch is OK to apply? Repository: rC Clang https://reviews.llvm.org/D46241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44607: Recompute invalidated iterator in insertTargetAndModeArgs

2018-05-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In https://reviews.llvm.org/D44607#1105962, @raj.khem wrote: > Can this be backported to release_60 branch too please ? The patch is compact, clear and addresses stability issue. I think it is worth of backporting to release_60. Repository: rL LLVM https://revie

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-21 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332847: [CodeGen] Recognize more cases of zero initialization (authored by sepavloff, committed by ). Changed prior to commit: https://reviews.llvm.org/D46241?vs=146091&id=147798#toc Repository: rC C

[PATCH] D47166: use zeroinitializer for (trailing zero portion of) large array initializers more reliably

2018-05-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. Now I understand your idea about moving the logic to `tryEmitPrivateForMemory`. Indeed it is more general and consistent solution. Thank you. Comment at: lib/CodeGen/C

[PATCH] D24933: Enable configuration files in clang

2017-10-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Here is a list of design solutions used in this implementation of config files. **How config file is specified** There are two ways to specify config file: - To encode it into executable file name, such as `foo-clang`, - To pass config file in command line arguments.

[PATCH] D24933: Enable configuration files in clang

2017-10-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 118315. sepavloff added a comment. Updated patch according to reviewer's notes https://reviews.llvm.org/D24933 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Config/config.h.cmake include/clang/Driver/Driver

[PATCH] D24933: Enable configuration files in clang

2017-10-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 28 inline comments as done. sepavloff added a comment. @hfinkel Thank you for explanations! https://reviews.llvm.org/D24933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, ikudrin. With this change compiler generates alignment checks for wider range of types. Previously such checks were generated only for the record types with non-trivial default constructor. So the types like: struct a

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In https://reviews.llvm.org/D49589#1171279, @ikudrin wrote: > Did you consider dividing the patch into two separate changes to solve the > two described issues independently? The both tow issues have the same cause: the check is genereated too late. Now it is genera

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 157102. sepavloff added a comment. Updated patch - Modified check generation. Now for each 'new' expression compiler tries to generate the checks. It solves problem of 'nested' new expressions, which appear when 'new' is used in default arguments. - Field

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/CodeGen/CodeGenFunction.h:380 + /// True if sanitizer checks for current pointer value are generated. + bool PointerChecksAreEmitted = false; + rjmccall wrote: > I don't think this is a good way of doing this. U

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-25 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 157305. sepavloff added a comment. Updated patch Now the information, if the pointer produced by 'new' operator is checked, is stored in objects used for pointer representation (`Address` and `AggValueSlot`) rather than globally. Also the tests were cleane

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 157519. sepavloff added a comment. Updated patch Now information, if sanitizer checks are generated while processing 'new' expression, is passed through function call arguments. Repository: rC Clang https://reviews.llvm.org/D49589 Files: lib/CodeGen

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. > Also, please remember that your analysis is not the only thing happening in > the compiler. isChecked is not a meaningful name taken out of context. `Address` is not modified in the current patch version. As for `AggValueSlot`, this method name is leaved, as there

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 157643. sepavloff added a comment. Updated patch Added names for boolean arguments, renamed a field in AggValueSlot. No functional changes. Repository: rC Clang https://reviews.llvm.org/D49589 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CGExprCXX.c

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 157677. sepavloff added a comment. Updated patch Use `SanitizerCheck` instead of `Check` in method and enum names. No functional changes. Repository: rC Clang https://reviews.llvm.org/D49589 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CGExprCXX.cpp

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. @rjmccall Thank you! Repository: rC Clang https://reviews.llvm.org/D49589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-28 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338199: [UBSan] Strengthen pointer checks in 'new' expressions (authored by sepavloff, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49589 File

[PATCH] D43017: Clean up use of C allocation functions

2018-02-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: akyrtzi, rnk. This change cleans up uses of malloc/calloc/realloc. In the case where the return value is not checked agains null pointer, the call to 'std::malloc' is replaced by 'llvm::malloc', which reports fatal error on allocation fai

[PATCH] D36701: Use Token::isOneOf method in Parser.

2018-02-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D36701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D43017: Clean up use of C allocation functions

2018-02-20 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325661: Clean up use of C allocation functions (authored by sepavloff, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D43017?vs=133201&id=1351

[PATCH] D33173: Modify test to look for patterns in stderr as well

2017-05-24 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303735: Modify test so that it looks for patterns in stderr as well (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D33173?vs=98928&id=100062#toc Repository: rL LLVM https

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-24 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303741: Method loadFromCommandLine should be able to report errors (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D33272?vs=99919&id=100069#toc Repository: rL LLVM https:

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-24 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303756: Driver must return non-zero code on errors in command line (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D33013?vs=99273&id=100090#toc Repository: rL LLVM https:

[PATCH] D30170: Function definition may have uninstantiated body

2017-05-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added a comment. In https://reviews.llvm.org/D30170#761342, @rsmith wrote: > Do we really need two different notions of "definition" and "odr definition" > here? What goes wrong if we always treat the "instantiation of a friend > function de

[PATCH] D30170: Function definition may have uninstantiated body

2017-05-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 100534. sepavloff added a comment. Updated patch - Reduce number of added functions, - Fixed some comments, - Function `isOdrDefined` now checks uninstantiated bodies only for friend functions. https://reviews.llvm.org/D30170 Files: include/clang/AST/

[PATCH] D33732: Catch invalid bitwise operation on vector of floats

2017-05-31 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. Bitwise complement applied to vector of floats described with attribute `ext_vector_type` is not diagnosed as error. Attempt to compile such construct causes assertion violation in Instruction.cpp. With this change the complement is treated similar to the case of v

[PATCH] D30170: Function definition may have uninstantiated body

2017-06-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101260. sepavloff added a comment. Do not call getCanonicalDecl for deleted functions https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp test/SemaCXX/cxx0x-cursory-default-delete.cpp test/SemaC

[PATCH] D33732: Catch invalid bitwise operation on vector of floats

2017-06-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: test/Sema/types.c:92 + +typedef float __attribute__((ext_vector_type(4))) float4; +float4 test3(float4 x) { bruno wrote: > Can you also add a test for the `vector_type` variant? It might be more > appropriate to put

[PATCH] D33732: Catch invalid bitwise operation on vector of floats

2017-06-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101359. sepavloff added a comment. Updated regression test The new regression test was obtained from Sema/vector-ops.c, the part of it that checks binary complement was copied. https://reviews.llvm.org/D33732 Files: lib/Sema/SemaExpr.cpp test/Sema/ex

[PATCH] D30170: Function definition may have uninstantiated body

2017-06-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101362. sepavloff added a comment. Updated patch according to review notes https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaCXX/friend2.cpp Index: test/SemaCXX

[PATCH] D30393: Do not inherit default arguments for friend function in class template.

2017-06-05 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101512. sepavloff added a comment. Rebased patch https://reviews.llvm.org/D30393 Files: lib/Sema/SemaDeclCXX.cpp test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp Index: test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp ===

[PATCH] D30375: Function with unparsed body is a definition

2017-06-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101517. sepavloff added a comment. Rebased patch https://reviews.llvm.org/D30375 Files: include/clang/AST/Decl.h include/clang/Sema/Sema.h lib/Parse/Parser.cpp lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cp

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-06-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:646 + // in this case, redefinition will be diagnosed later. + (New->isInlineSpecified() || !New->isOutOfLine() || + !New->getLexicalDeclContext()->isRecord())) { --

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-06-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101666. sepavloff added a comment. Rebased and enhance check https://reviews.llvm.org/D26065 Files: lib/Sema/SemaDeclCXX.cpp test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp Index: test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp =

[PATCH] D33732: Catch invalid bitwise operation on vector of floats

2017-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304963: Catch invalid bitwise operation on vector of floats (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D33732?vs=101359&id=101856#toc Repository: rL LLVM https://revi

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304964: Improve diagnostics if friend function redefines file-level function. (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D26065?vs=101666&id=101859#toc Repository: rL

[PATCH] D30393: Do not inherit default arguments for friend function in class template.

2017-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304965: Do not inherit default arguments for friend function in class template. (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D30393?vs=101512&id=101861#toc Repository: r

[PATCH] D30375: Function with unparsed body is a definition

2017-06-08 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you for explanation. Probably making new semantic action is an overkill. The intent was to postpone setting flag `WillHaveBody` as late as possible, to the moment when it becomes clear that the function indeed will have a body. Otherwise parsing of deleted funct

[PATCH] D30375: Function with unparsed body is a definition

2017-06-08 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101993. sepavloff added a comment. Changed implementation https://reviews.llvm.org/D30375 Files: include/clang/AST/Decl.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaCX

[PATCH] D30375: Function with unparsed body is a definition

2017-06-14 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305379: Function with unparsed body is a definition (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D30375?vs=101993&id=102512#toc Repository: rL LLVM https://reviews.llvm

[PATCH] D30375: Function with unparsed body is a definition

2017-06-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you! Committed as is, improvements will be made as separate patches. Repository: rL LLVM https://reviews.llvm.org/D30375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D30375: Function with unparsed body is a definition

2017-06-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Initial commit (r305379) was reverted (r305381) because it broke self builds. The reason was not related to the WillHaveBody flag but was due to the change: if (isFriend) { Function->setObjectOfFriendDecl(); if (FunctionTemplate) FunctionTemplate->setOb

[PATCH] D41189: [Frontend] Treat function with skipped body as definition

2017-12-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang https://reviews.llvm.org/D41189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D24933: Enable configuration files in clang

2017-12-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 127109. sepavloff added a comment. Updated patch Fixed cmake config file definition. Use llvm::sys::fs::make_absolute to get absolute path. https://reviews.llvm.org/D24933 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td inc

[PATCH] D24933: Enable configuration files in clang

2017-12-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: include/clang/Config/config.h.cmake:40 +#cmakedefine CLANG_CONFIG_FILE_SYSTEM_DIR ${CLANG_CONFIG_FILE_SYSTEM_DIR} +#cmakedefine CLANG_CONFIG_FILE_USER_DIR ${CLANG_CONFIG_FILE_USER_DIR} +

[PATCH] D41179: [Sema] Diagnose template specializations with C linkage

2017-12-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Is it correct to emit error in this case? According to the Standard 10.5p1 "All function types, function names with external linkage, and variable names with external linkage have a language linkage". So templates do not have a language linkage. The next paragraph, wh

[PATCH] D41237: [Frontend] Handle skipped bodies in template instantiations

2017-12-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12184 Decl *Sema::ActOnSkippedFunctionBody(Decl *Decl) { - if (FunctionDecl *FD = dyn_cast_or_null(Decl)) + if (FunctionDecl *FD = Decl->getAsFunction()) FD->setHasSkippedBody(); In the ca

[PATCH] D41433: Unit tests for TBAA metadata generation.

2017-12-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, hfinkel. Herald added subscribers: kosarev, mgorny. Now tests for metadata created by clang involve compiling code snippets placed into c/c++ source files and matching interesting patterns in the obtained textual representation

[PATCH] D41237: [Frontend] Handle skipped bodies in template instantiations

2017-12-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang https://reviews.llvm.org/D41237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D24933: Enable configuration files in clang

2017-12-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 127911. sepavloff marked 2 inline comments as done. sepavloff added a comment. Small corrections to the patch - Avoid quick return in the case of error, it may cause fails of clang tools. - Fixed typo. Repository: rC Clang https://reviews.llvm.org/D249

[PATCH] D41433: Unit tests for TBAA metadata generation.

2017-12-22 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321360: Unit tests for TBAA metadata generation. (authored by sepavloff, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41433 Files: cfe/trunk/unittests/CodeGen/CMakeLists.txt cfe/t

[PATCH] D41492: [Frontend] Correctly handle instantiating ctors with skipped bodies

2017-12-25 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang https://reviews.llvm.org/D41492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D41179: [Sema] Diagnose template specializations with C linkage

2017-12-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In https://reviews.llvm.org/D41179#964526, @faisalv wrote: > In https://reviews.llvm.org/D41179#964522, @miyuki wrote: > > > In https://reviews.llvm.org/D41179#957992, @sepavloff wrote: > > > > > Classes do not have language linkage according to 10.5p1, just as > > >

[PATCH] D24933: Enable configuration files in clang

2017-12-30 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321587: Enable configuration files in clang (authored by sepavloff, committed by ). Repository: rL LLVM https://reviews.llvm.org/D24933 Files: cfe/trunk/docs/UsersManual.rst cfe/trunk/include/clan

[PATCH] D43805: Optionally use nameless IR types

2018-02-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall. Type in the LLVM IR may have names but only for the purpose of human readability (see discussions in https://reviews.llvm.org/D40567, http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20171127/210816.html and http:

[PATCH] D40567: Always show template parameters in IR type names

2018-02-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff abandoned this revision. sepavloff added a comment. The feedback here, in https://reviews.llvm.org/D40508 and in the mail list (http://lists.llvm.org/pipermail/llvm-dev/2017-December/119585.html) demonstrates that this is a wrong direction. Part of this patch is used in https://reviews

[PATCH] D40508: Replace long type names in IR with hashes

2018-02-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff abandoned this revision. sepavloff added a comment. Using llvm type names is considered a wrong direction. https://reviews.llvm.org/D40508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D43805: Optionally use nameless IR types

2018-02-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 136087. sepavloff added a comment. Updated patch - command line option was renamed to `-fir-type-names=`, - this option is not hidden, as most options in `-f` namespace, - new value, `auto` was added to possible values of this option. Repository: rC Cla

[PATCH] D43805: Optionally use nameless IR types

2018-02-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added inline comments. Comment at: include/clang/Driver/Options.td:1735 + HelpText<"Whether to use IR type names (option: none, use)">, + Values<"none,use">; def relocatable_pch : Flag<["-", "--"], "relocatable-pch">, Flags

[PATCH] D30170: Function definition may have uninstantiated body

2018-02-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. The issue is still observed in trunk. Other compilers process the tests correctly (checked using https://godbolt.org/). For instance, the code: template struct C20 { friend void func_20() {} // expected-note{{previous definition is here}} }; C20 c20i; void fu

[PATCH] D30170: Function definition may have uninstantiated body

2018-02-28 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326419: Function definition may have uninstantiated body (authored by sepavloff, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D30170?vs=1155

[PATCH] D30170: Function definition may have uninstantiated body

2018-02-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 3 inline comments as done. sepavloff added a comment. Thank you! Comment at: lib/Sema/SemaDecl.cpp:11995-12006 +for (auto I : FD->redecls()) { + if (I != FD && !I->isInvalidDecl() && + I->getFriendObjectKind() != Decl::FOK_None) { +if

[PATCH] D43805: Optionally use nameless IR types

2018-03-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added a comment. In https://reviews.llvm.org/D43805#1029455, @pcc wrote: > Why is this a driver flag? This seems like it ought to be a cc1-only flag to > me. Yous are right, this is more like development option. But having the driver flag

[PATCH] D43805: Optionally use nameless IR types

2018-03-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: include/clang/Driver/Options.td:644 + HelpText<"Whether to use IR type names (option: auto, none, use)">, + Values<"auto,none,use">; + rsmith wrote: > Having "none" and "use" as values for the same option seems like

[PATCH] D43805: Optionally use nameless IR types

2018-03-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In https://reviews.llvm.org/D43805#1029479, @pcc wrote: > > If the backend will be changed so that it will not depend on IR type names > > Are you referring to https://reviews.llvm.org/D43199? If so it seems to me > that this should be a cc1 flag that defaults to wheth

[PATCH] D43805: Optionally use nameless IR types

2018-03-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 137336. sepavloff added a comment. Use more consistent option names Repository: rC Clang https://reviews.llvm.org/D43805 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def include/clang/Frontend/CodeGenOptions.h li

[PATCH] D21508: Diagnose friend function template redefinitions

2018-03-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 138303. sepavloff added a comment. Updated patch - Rebased relative to recent ToT - Removed the change in `FunctionDecl::getTemplateInstantiationPattern()`, as it is not necessary for error detection, - Added test for use in module. Repository: rC Clan

[PATCH] D44607: Recompute invalidated iterator in insertTargetAndModeArgs

2018-03-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Good catch, thank you. To avoid code duplication you could change `InsertionPoint` into an index and use `begin() + InsertionPoint` in calls to `insert`. Repository: rC Clang https://reviews.llvm.org/D44607 ___ cfe-co

[PATCH] D44607: Recompute invalidated iterator in insertTargetAndModeArgs

2018-03-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. Thank you! Repository: rC Clang https://reviews.llvm.org/D44607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D21508: Diagnose friend function template redefinitions

2018-03-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Other compilers successfully recognize errors (checked using https://godbolt.org/). For instance, the code: template inline void func_35(T *x); template struct C35a { template friend void func_35(T *x) {} }; template struct C35b { template friend vo

[PATCH] D44607: Recompute invalidated iterator in insertTargetAndModeArgs

2018-03-19 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327863: [Driver] Avoid invalidated iterator in insertTargetAndModeArgs (authored by sepavloff, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/

[PATCH] D21508: Diagnose friend function template redefinitions

2018-12-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 176763. sepavloff added a comment. Updated patch The fix for https://bugs.llvm.org/show_bug.cgi?id=39742 put a test case, which is not a valid code. The error is detected with this patch, tests are updated accordingly. Repository: rC Clang CHANGES SINC

[PATCH] D21508: Diagnose friend function template redefinitions

2018-12-06 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348473: Diagnose friend function template redefinitions. (authored by sepavloff, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D21508?vs=1767

[PATCH] D36057: Use class to pass information about executable name

2017-08-28 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311981: Use class to pass information about executable name (authored by sepavloff). Repository: rL LLVM https://reviews.llvm.org/D36057 Files: cfe/trunk/include/clang/Driver/Driver.h cfe/trunk/in

[PATCH] D36057: Use class to pass information about executable name

2017-08-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. @echristo Committed, thanks. Repository: rL LLVM https://reviews.llvm.org/D36057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30170: Function definition may have uninstantiated body

2017-09-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 115534. sepavloff added a comment. Rebased patch. https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaCXX/friend2.cpp Index: test/SemaCXX/friend2.cpp

[PATCH] D21508: Diagnose friend function template redefinitions

2017-09-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 115539. sepavloff added a comment. Rebased https://reviews.llvm.org/D21508 Files: include/clang/AST/DeclBase.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaCXX/friend2.cpp Index: test/SemaCXX/friend2.

[PATCH] D21767: Fix instantiation of friend function templates

2017-09-25 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 116484. sepavloff edited the summary of this revision. sepavloff added a comment. Added regression test for PR34343 Investigation of this defect is presented in https://bugs.llvm.org/show_bug.cgi?id=34343 . https://reviews.llvm.org/D21767 Files: inclu

[PATCH] D64932: [Parser] Emit descriptive diagnostic for misplaced pragma

2019-07-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, erik.pilkington, ABataev. Herald added a subscriber: dexonsmith. Herald added a project: clang. If a class or struct or union declaration contains a pragma that is not valid in this context, compiler issues generic error

[PATCH] D64932: [Parser] Emit descriptive diagnostic for misplaced pragma

2019-07-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64932/new/ https://reviews.llvm.org/D64932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D65405: [Parser] Use special definition for pragma annotations

2019-07-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall. Herald added a reviewer: jdoerfert. Herald added a project: clang. Previously pragma annotation tokens were described as any other annotations in TokenKinds.def. This change introduces special macro PRAGMA_ANNOTATION for

[PATCH] D65406: [Parser] Change parameter type from int to enum

2019-07-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall. Herald added a project: clang. Some parser functions accept argument of type unsigned while it is actually of type DeclSpec::TST. No functional changes. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D

[PATCH] D64932: [Parser] Emit descriptive diagnostic for misplaced pragma

2019-07-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 212188. sepavloff added a comment. Updated patch Move logically independent changes to separate patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64932/new/ https://reviews.llvm.org/D64932 Files: cla

[PATCH] D65406: [Parser] Change parameter type from int to enum

2019-08-01 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367545: [Parser] Change parameter type from int to enum (authored by sepavloff, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://re

[PATCH] D65405: [Parser] Use special definition for pragma annotations

2019-08-01 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL367575: [Parser] Use special definition for pragma annotations (authored by sepavloff, committed by ). Herald added a proj

[PATCH] D64932: [Parser] Emit descriptive diagnostic for misplaced pragma

2019-08-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 213023. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64932/new/ https://reviews.llvm.org/D64932 Files: clang/include/clang/Basic/DiagnosticParseKinds.td clang/li

[PATCH] D64932: [Parser] Emit descriptive diagnostic for misplaced pragma

2019-08-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: clang/lib/Basic/TokenKinds.cpp:15 #include "llvm/Support/ErrorHandling.h" +#include using namespace clang; rjmccall wrote: > This is no longer necessary, right? Sure, remo

[PATCH] D65670: Use switch instead of series of comparisons

2019-08-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, alexfh. Herald added a project: clang. This is style correction, no functional changes. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D65670 Files: clang/include/clang/Basic/TokenKinds.h clang/lib/Basic/

[PATCH] D65405: [Parser] Use special definition for pragma annotations

2019-08-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. > LGTM, although I don't think it would be ridiculous to make this an inline > function definition like isAnnotation. Thank you! The fix for `isAnnotation` is D65670 . Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews

[PATCH] D65670: Use switch instead of series of comparisons

2019-08-03 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367759: Use switch instead of series of comparisons (authored by sepavloff, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D64932: [Parser] Emit descriptive diagnostic for misplaced pragma

2019-08-04 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sepavloff marked an inline comment as done. Closed by commit rL367779: [Parser] Emit descriptive diagnostic for misplaced pragma (authored by sepavloff, committed by ). Herald added a project: LLVM. Herald added a subscriber

[PATCH] D65994: Extended FPOptions with new attributes

2019-08-08 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: anemet, kpn, aaron.ballman, hfinkel, rsmith, rjmccall. Herald added a project: clang. This change added two new attributes, rounding mode and exception behavior to the structure FPOptions. These attributes allow more flexible treatment o

  1   2   3   4   5   6   7   >