[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 177620. leonardchan marked 2 inline comments as done. leonardchan added a comment. - Added the CXX11 test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55447/new/ https://reviews.llvm.org/D55447 Files:

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D53738#1325998 , @rjmccall wrote: > We sent the question out, but we haven't gotten a response yet. I think > going forward under the idea that this just changes the type but does the > operation on the original operand

[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 177587. leonardchan marked 3 inline comments as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55447/new/ https://reviews.llvm.org/D55447 Files: clang/include/clang/Sema/Sema.h clang/lib/AST/TypePrinter.cpp

[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/test/Sema/address_space_attribute.cpp:9 + // CHECK: VarDecl {{.*}} x '__attribute__((address_space(1))) int *' + __attribute__((address_space(1))) int *x; + aaron.ballman wrote: > Can you also add a test

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D53738#1320936 , @rjmccall wrote: > Okay, thanks, that makes sense to me. > > I'll ask around to find a way to contact the C committee. @rjmccall Any updates on this? If we aren't able to find a way to contact anyone

[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 177561. leonardchan marked an inline comment as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55447/new/ https://reviews.llvm.org/D55447 Files: clang/include/clang/Sema/Sema.h clang/lib/AST/TypePrinter.cpp

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-12-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 177335. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51329/new/ https://reviews.llvm.org/D51329 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/RecursiveASTVisitor.h

[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rsmith, aaron.ballman. leonardchan added a project: clang. This is a fix for https://reviews.llvm.org/D51229 where we pass the address_space qualified type as the modified type of an AttributedType. This change now instead wraps

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-12-05 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348442: [Sema/Attribute] Check for noderef attribute (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D49511?vs=176907=176908#toc Repository: rC Clang

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-12-05 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 176907. leonardchan marked an inline comment as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49511/new/ https://reviews.llvm.org/D49511 Files: clang/include/clang/Basic/Attr.td

[PATCH] D54014: [Sema] Push and Pop Expression Evaluation Context Records at the start and end of function definitions

2018-12-05 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348434: [Sema] Push and Pop Expression Evaluation Context Records at the start and end… (authored by leonardchan, committed by ). Changed prior to commit:

[PATCH] D54014: [Sema] Push and Pop Expression Evaluation Context Records at the start and end of function definitions

2018-12-05 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 176893. leonardchan marked an inline comment as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54014/new/ https://reviews.llvm.org/D54014 Files: clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaDeclObjC.cpp

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-05 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + ebevhan wrote: > rjmccall wrote: > > ebevhan wrote: > > > rjmccall wrote: > > > > leonardchan wrote: > > > > > rjmccall wrote: > > > > > > leonardchan

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-05 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 176862. leonardchan marked an inline comment as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53738/new/ https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > leonardchan wrote: > > > > rjmccall wrote:

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-12-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* @rsmith Any more comments on this patch or the one before it (https://reviews.llvm.org/D54014)? That one has the fix for pushing and popping another ExprEvalContext before acting on a function body in this patch. Repository: rC Clang CHANGES SINCE LAST

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > ebevhan wrote: > > > > rjmccall wrote: > >

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > ebevhan wrote: > > rjmccall wrote: > > > leonardchan wrote: > > > > rjmccall wrote: > >

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/include/clang/Basic/FixedPoint.h:67 + FixedPointSemantics + getCommonSemantics(const FixedPointSemantics ) const; + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > Actually representing the

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 176204. leonardchan marked 6 inline comments as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53738/new/ https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 175965. leonardchan marked 14 inline comments as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53738/new/ https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/include/clang/Basic/FixedPoint.h:67 + FixedPointSemantics + getCommonSemantics(const FixedPointSemantics ) const; + rjmccall wrote: > Actually representing the fully-precise value is operation-specific;

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > It's certainly interesting to degenerate integer-with-fixedpoint to just a > mul (since the scaling factor is 2^-n * 2^0, which is just 2^-n), but in the > general case you can't avoid doing the scale alignment. Unless I'm missing > something. No you're right.

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added a comment. In D53738#1309171 , @ebevhan wrote: > In D53738#1308314 , @leonardchan > wrote: > > > > Generally I think it's good! One final note; I

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added a comment. > Generally I think it's good! One final note; I assume we could technically > reuse/rename the EmitFixedPointAdd function and use it to emit other binops > when those are added? Yes, but I imagine if we choose to keep

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @ebevhan Any more comments on this patch? Repository: rC Clang https://reviews.llvm.org/D53738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 174640. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h clang/include/clang/Basic/FixedPoint.h

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/test/Frontend/fixed_point_add.c:269 + // UNSIGNED-NEXT: [[SUM:%[0-9]+]] = call i15 @llvm.uadd.sat.i15(i15 [[USA_TRUNC]], i15 [[USA_SAT_TRUNC]]) + // UNSIGNED-NEXT: [[SUM_EXT:%[a-z0-9]+]] = zext i15 [[SUM]] to i16 + //

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > Good case to bring up. For addition, I think we just need to add an extra > condition that checks for unsigned padding in the result. Added this test > also. Actually this was wrong. Updated and instead dictate how the appropriate number of bits to

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 174279. Repository: rC Clang https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h clang/include/clang/Basic/FixedPoint.h clang/lib/AST/ASTContext.cpp clang/lib/Basic/FixedPoint.cpp

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 174235. leonardchan marked 13 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h clang/include/clang/Basic/FixedPoint.h

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D53738#1299557, @ebevhan wrote: > I'd be interested in seeing tests for two saturating unsigned _Fract with and > without padding. > > If the padding case emits a uadd_sat, that seems wrong; uadd_sat doesn't > saturate on the padding

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/Basic/FixedPoint.cpp:129 + std::max(NonFractBits, OtherNonFractBits) + CommonScale; + + bool ResultIsSigned = isSigned() || Other.isSigned(); ebevhan wrote: > Does this properly compensate for types

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 174080. leonardchan marked 5 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h clang/include/clang/Basic/FixedPoint.h

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. For the integer conversion though, I was going to add that in a separate fixed-point-to-int and int-to-fixed-point patch. Repository: rC Clang https://reviews.llvm.org/D53738 ___ cfe-commits mailing list

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Sorry for the delay in responding to this. Been working on a few other patches. A couple of the bigger changes so far: - Added `getCommonSemantics` to `FixedPointSemantics` for finding a common full precision semantic. - `getFixedPointSemantics` accepts an int

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 173961. leonardchan marked 11 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/Basic/FixedPoint.h clang/lib/AST/ASTContext.cpp

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-11-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/AST/TypePrinter.cpp:958-964 + // Remove the address_space qualifier so it does not get printed. We + // instead want to print the macro only. + SplitQualType SplitTy = AttrTy->getModifiedType().split(); +

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-11-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Sema/SemaType.cpp:5817-5822 + IdentifierInfo *AddressSpaceMacroII = nullptr; + auto FoundMacro = S.PP.AddressSpaceMacros.find( + S.SourceMgr.getSpellingLoc(Attr.getLoc())); + if (FoundMacro !=

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-11-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 173090. leonardchan marked an inline comment as done. leonardchan added a comment. Herald added a subscriber: arphaman. - Added a new type sugar node `MacroDefinedType` which wraps `AttributedType`s for the purpose of determining if an attribute was

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-11-05 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 172695. leonardchan marked 5 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D49511 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-11-05 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Parse/ParseStmt.cpp:102-104 + Actions.PushExpressionEvaluationContext( + Actions.ExprEvalContexts.back().Context); ParenBraceBracketBalancer BalancerRAIIObj(*this); leonardchan wrote: > rsmith wrote: >

[PATCH] D54014: [Sema] Push and Pop Expression Evaluation Context Records at the start and end of function definitions

2018-11-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rsmith, aaron.ballman. leonardchan added a project: clang. leonardchan added a dependent revision: D49511: [Sema/Attribute] Check for noderef attribute. leonardchan removed a dependent revision: D49511: [Sema/Attribute] Check for

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-10-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 2 inline comments as done. leonardchan added inline comments. Comment at: lib/Parse/ParseStmt.cpp:102-104 + Actions.PushExpressionEvaluationContext( + Actions.ExprEvalContexts.back().Context); ParenBraceBracketBalancer BalancerRAIIObj(*this);

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-10-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3223-3247 +if (ResultWidth < CommonWidth) { + // In the event we extended the sign of both operands, the intrinsic will + // not saturate to the initial bit width of the result type.

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-10-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: ebevhan, bjope, rjmccall. leonardchan added a project: clang. This patch covers addition between fixed point types and other fixed point types or integers, using the conversion rules described in 4.1.4 of N1169. Usual arithmetic

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

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

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

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

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

2018-10-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2026 +return EmitScalarConversion(Visit(E), E->getType(), DestTy, +CE->getExprLoc()); ebevhan wrote: > rjmccall wrote: > > Why are you pushing

[PATCH] D53381: [clang-doc] Bringing bitcode tests in line

2018-10-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp:39-40 +return writeInfo(*static_cast(I)); + default: +return ""; + }

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-17 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344699: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with… (authored by leonardchan, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2018-10-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1032 + // them. + return Builder.CreateIsNotNull(Src); +} ebevhan wrote: > Is this comment true? I don't think EmitFixedPointConversion does this. > > Maybe I'm

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

2018-10-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 169863. leonardchan marked 3 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D53308 Files: clang/include/clang/AST/OperationKinds.def clang/lib/AST/Expr.cpp clang/lib/AST/ExprConstant.cpp clang/lib/CodeGen/CGExpr.cpp

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @philip.pfaffe @fedor.sergeev Do you have any more comments on this patch? Repository: rC Clang https://reviews.llvm.org/D52814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-10-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: ebevhan, rjmccall, bjope. leonardchan added a project: clang. This patch is a part of https://reviews.llvm.org/D48456 in an attempt to split the casting logic up into smaller patches. This contains the code for casting from fixed

[PATCH] D53299: [Fixed Point Arithmetic] Fix for clang-tools-extra warning

2018-10-15 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE344549: [Fixed Point Arithmetic] Fix for clang-tools-extra warning (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D53299?vs=169741=169745#toc Repository:

[PATCH] D53299: [Fixed Point Arithmetic] Fix for clang-tools-extra warning

2018-10-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 169741. leonardchan marked 2 inline comments as done. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53299 Files: clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp Index:

[PATCH] D53299: [Fixed Point Arithmetic]

2018-10-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a reviewer: bjope. leonardchan added a project: clang-tools-extra. Fix for warnings generated on unhandled enum value `STK_FixedPoint`. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53299 Files:

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-10-15 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344530: [Fixed Point Arithmetic] FixedPointCast (authored by leonardchan, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-10-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 169714. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D50616 Files: include/clang/AST/OperationKinds.def include/clang/AST/Type.h include/clang/Basic/DiagnosticCommonKinds.td lib/AST/Expr.cpp

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D52814#1262550, @philip.pfaffe wrote: > You're right, my bad; I missed the fact that it's EP_OptimizerLast, which has > no equivalent in the new PM. Your implementation is actually correct here. > > Did you run your test in a debug build?

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 169516. Repository: rC Clang https://reviews.llvm.org/D52814 Files: lib/CodeGen/BackendUtil.cpp test/CodeGen/asan-new-pm.ll Index: test/CodeGen/asan-new-pm.ll === --- /dev/null +++

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-10-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 169500. leonardchan added a comment. - Removed target hook Repository: rC Clang https://reviews.llvm.org/D50616 Files: include/clang/AST/OperationKinds.def include/clang/AST/Type.h include/clang/Basic/DiagnosticCommonKinds.td

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-10-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 169495. Repository: rC Clang https://reviews.llvm.org/D50616 Files: include/clang/AST/OperationKinds.def include/clang/AST/Type.h include/clang/Basic/DiagnosticCommonKinds.td lib/AST/Expr.cpp lib/AST/ExprConstant.cpp lib/AST/Type.cpp

[PATCH] D53170: [clang-doc] Switch to default to all-TUs executor

2018-10-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp:90-92 +static llvm::cl::opt +ClangDocExecutorName("doc-executor", llvm::cl::desc("The name of the executor to use in clang-doc."), + llvm::cl::init("all-TUs"));

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-10-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @ebevhan @rjmccall Seeing that the saturation intrinsic in https://reviews.llvm.org/D52286 should be put on hold for now, would it be fine to submit this patch as is? Then if the intrinsic is finished, come back to this and update this patch to use the intrinsic?

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-10-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > This sounds like something that would be better handled in the build system > rather than in source code. In particular, I think you don't actually want to > detect "is this translation unit being compiled with ubsan enabled?", you > instead want to detect "is

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 168348. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D52814 Files: lib/CodeGen/BackendUtil.cpp test/CodeGen/asan-new-pm.ll Index: test/CodeGen/asan-new-pm.ll

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D52814#1254901, @philip.pfaffe wrote: > Is this the right place in the pipeline to put the passes? The legacy PM > inserts the asan passes at EP_OptimizerLast, why not do the same thing? I noticed this also and thought adding this using

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-10-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D52386#1254437, @rsmith wrote: > I'm not at all convinced that this is a good thing. There isn't such a thing > as "undefined behavior sanitizer". Rather, there are a whole bunch of > different checks that fall under the same umbrella.

[PATCH] D52847: [clang-doc] Handle anonymous namespaces

2018-10-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang-tools-extra/clang-doc/Representation.cpp:193-216 +llvm::SmallString<16> Info::extractFileName() { + switch (IT) { + case InfoType::IT_namespace: +// The case of anonymous namespaces is taken care of in serialization, so

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: mcgrathr, phosek, fedor.sergeev, philip.pfaffe, vitalybuka. leonardchan added projects: clang, Sanitizers. leonardchan added a dependency: D52739: [PassManager/Sanitizer] Port of AddresSanitizer pass from legacy to new PassManager.

[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

2018-09-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1119 + case ISD::SSAT: +// Target legalization checked here? +Action = TargetLowering::Expand; ebevhan wrote: > leonardchan wrote: > > ebevhan wrote: > > >

[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

2018-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Of the intrinsics we plan to implement, it seems that the ordering of legalization affects specifically the fixed point mul/div intrinsics since if they get expanded into other nodes, we will need to check again for legal types since performing scaled mul/div

[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

2018-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 166756. leonardchan added a reviewer: rjmccall. leonardchan changed the repository for this revision from rC Clang to rL LLVM. Repository: rL LLVM https://reviews.llvm.org/D52286 Files: include/llvm/CodeGen/ISDOpcodes.h

[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

2018-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 166746. leonardchan added a comment. Herald added a subscriber: cfe-commits. - Removed passes since ssaturate can be expanded in the DAG Repository: rC Clang https://reviews.llvm.org/D52286 Files: include/llvm/CodeGen/ISDOpcodes.h

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342793: [Lexer] Add udefined_behavior_sanitizer feature (authored by leonardchan, committed by ). Repository: rL LLVM https://reviews.llvm.org/D52386 Files: include/clang/Basic/Features.def

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342793: [Lexer] Add udefined_behavior_sanitizer feature (authored by leonardchan, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, kcc, echristo, vitalybuka, morehouse. leonardchan added a project: clang. This can be used to detect whether the code is being built with UBSan using the __has_feature(undefined_behavior_sanitizer) predicate. Repository:

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-09-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 164706. leonardchan added a comment. - Push and pop contexts for every parsed statement inside `ParseStatementOrDeclaration` instead of at the start and end of compound statements Repository: rC Clang https://reviews.llvm.org/D49511 Files:

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-09-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 7 inline comments as done. leonardchan added a comment. @rsmith So I chose to go with the type sugar route since we would prefer to have multiple attributes in one attribute list. This type just contains the underlying type and the macro identifier originally held by the

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-09-05 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 164136. leonardchan added a comment. - Push and pop a new ExpressionEvaluationContext when we enter and exit a compound statement. - Remove Start/StopCheckingNoderef functions since we can now warn whenever we pop Repository: rC Clang

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/AST/TypePrinter.cpp:1370 + +// Remove the underlying address space so it won't be printed. +SplitQualType SplitTy = T->getModifiedType().split(); rsmith wrote: > leonardchan wrote: > > rsmith wrote: > >

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 163604. leonardchan marked 8 inline comments as done. leonardchan added a comment. - Removed default value for `getAttributedType` and added any macro identifier necessary as a fourth argument to `getAttributedType` - Added tracking for `LateAttr`s to

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Parse/ParseDecl.cpp:244-252 +// If this was declared in a macro, attatch the macro IdentifierInfo to the +// parsed attribute. +for (const auto : PP.getAttributeMacros()) { + if

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 5 inline comments as done. leonardchan added a comment. @rsmith When you clarify what you mean by `outermost macro expansion`? Say I have the following: #define ATTR __attribute__ #define AS(i) address_space(i) #define AS1 ATTR((address_space(1))) #define AS2

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/AST/TypePrinter.cpp:1370 + +// Remove the underlying address space so it won't be printed. +SplitQualType SplitTy = T->getModifiedType().split(); rsmith wrote: > leonardchan wrote: > > rsmith wrote: > >

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 163155. Repository: rC Clang https://reviews.llvm.org/D51329 Files: include/clang/AST/ASTContext.h include/clang/AST/Type.h include/clang/Lex/Preprocessor.h include/clang/Sema/ParsedAttr.h lib/AST/ASTContext.cpp lib/AST/TypePrinter.cpp

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/AST/TypePrinter.cpp:1370 + +// Remove the underlying address space so it won't be printed. +SplitQualType SplitTy = T->getModifiedType().split(); rsmith wrote: > This is unnecessary; just print the

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162966. leonardchan marked 3 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D51329 Files: include/clang/AST/ASTContext.h include/clang/AST/Type.h include/clang/Lex/Preprocessor.h lib/AST/ASTContext.cpp

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Actually, after posting this I realize I didn't handle the macro expansion very well. I'll fix this first. Repository: rC Clang https://reviews.llvm.org/D51329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rsmith, rjmccall, ebevhan, mcgrathr, phosek. leonardchan added a project: clang. If an `address_space` attribute is defined in a macro, print the macro instead when diagnosing a warning or error for incompatible pointers with

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-27 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340765: [Sema/Attribute] Make types declared with address_space an AttributedType (authored by leonardchan, committed by ). Repository: rC Clang https://reviews.llvm.org/D51229 Files:

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162711. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D51229 Files: include/clang/Basic/Attr.td lib/AST/TypePrinter.cpp lib/Sema/SemaType.cpp Index: lib/Sema/SemaType.cpp

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162515. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D51229 Files: include/clang/Basic/Attr.td lib/AST/TypePrinter.cpp lib/Sema/SemaType.cpp Index: lib/Sema/SemaType.cpp

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162487. leonardchan marked 3 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D51229 Files: include/clang/Basic/Attr.td lib/AST/TypePrinter.cpp lib/Sema/SemaType.cpp Index: lib/Sema/SemaType.cpp

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @rsmith ping Repository: rC Clang https://reviews.llvm.org/D49511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51229: [Sema/Attribute] Make types declared with address_space an AttributedType

2018-08-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rjmccall, rsmith, phosek, mcgrathr, ebevhan, theraven. leonardchan added a project: clang. Currently an address_space is stored in a qualifier. This makes any type declared with an address_space attribute in the form

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Parse/ParseExpr.cpp:1126 + +Actions.StartCheckingNoDeref(); + rsmith wrote: > leonardchan wrote: > > rsmith wrote: > > > This parser-driven start/stop mechanism will not work in C++ templates. > > >

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162126. leonardchan marked 13 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticGroups.td

<    2   3   4   5   6   7   8   9   >