<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in local-classes.cpp</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>56f1de4d - Fix PR25627: constant expressions being odr-used in template arguments.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp#56f1de4d</link>
        <description>Fix PR25627: constant expressions being odr-used in template arguments.This patch ensures that clang processes the expression-nodes that are generated when disambiguating between types and expressions within template arguments as constant-expressions by installing the ConstantEvaluated ExpressionEvaluationContext just before attempting the disambiguation - and then making sure that Context carries through into ParseConstantExpression (by refactoring it out into a function that does not create its own EvaluationContext: ParseConstantExpressionInExprEvalContext) Note, prior to this patch, trunk would correctly disambiguate and identify the expression as an expression - and while it would annotate the token with the expression - it would fail to complete the odr-use processing (specifically, failing to trigger Sema::UpdateMarkingForLValueToRValue as is done for all Constant Expressions, which would remove it from being considered odr-used).  By installing the ConstantExpression Evaluation Context prior to disambiguation, and making sure it carries though, we ensure correct processing of the expression-node.For e.g:  template&lt;int&gt; struct X { };  void f() {    const int N = 10;    X&lt;N&gt; x; // should be OK.    [] { return X&lt;N&gt;{}; }; // Should be OK - no capture - but clang errors!  }See a related bug: https://bugs.llvm.org//show_bug.cgi?id=25627In summary (and reiteration), the fix is as follows:    - Remove the EnteredConstantEvaluatedContext action from ParseTemplateArgumentList (relying on ParseTemplateArgument getting it right)    - Add the EnteredConstantEvaluatedContext action just prior to undergoing the disambiguating parse, and if the parse succeeds for an expression, carry the context though into a refactored version of ParseConstantExpression that does not create its own ExpressionEvaluationContext.See https://reviews.llvm.org/D31588 for additional context regarding some of the more fragile and complicated approaches attempted, and Richard&apos;s feedback that eventually shaped the simpler and more robust rendition that is being committed.Thanks Richard!llvm-svn: 303492

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp</description>
        <pubDate>Sat, 20 May 2017 19:58:04 +0000</pubDate>
        <dc:creator>Faisal Vali &lt;faisalv@yahoo.com&gt;</dc:creator>
    </item>
<item>
        <title>c6e68daa - Prior to adding the new &quot;expected-no-diagnostics&quot; directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp#c6e68daa</link>
        <description>Prior to adding the new &quot;expected-no-diagnostics&quot; directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.llvm-svn: 166280

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp</description>
        <pubDate>Fri, 19 Oct 2012 12:44:48 +0000</pubDate>
        <dc:creator>Andy Gibbs &lt;andyg1001@hotmail.co.uk&gt;</dc:creator>
    </item>
<item>
        <title>15243330 - It&apos;s okay to refer to non-type template parameters anywhere they are</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp#15243330</link>
        <description>It&apos;s okay to refer to non-type template parameters anywhere they arevisible. Fixes the remaining two failures in Boost.ScopeExit.llvm-svn: 102466

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp</description>
        <pubDate>Tue, 27 Apr 2010 21:10:04 +0000</pubDate>
        <dc:creator>Douglas Gregor &lt;dgregor@apple.com&gt;</dc:creator>
    </item>
<item>
        <title>1d85d290 - Fix an amusing typo that completely the re-introduction of parameters</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp#1d85d290</link>
        <description>Fix an amusing typo that completely the re-introduction of parametersfor the purposes of parsing default arguments. In effect, we wouldre-introduce the parameter with a default argument N times (where N isthe number of parameters preceding the parameter with a defaultargument). This showed up when a defaulted parameter of a memberfunction of a local class shadowed a parameter of the enclosingfunction. Fixes PR6383.llvm-svn: 97534

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp</description>
        <pubDate>Tue, 02 Mar 2010 01:29:43 +0000</pubDate>
        <dc:creator>Douglas Gregor &lt;dgregor@apple.com&gt;</dc:creator>
    </item>
<item>
        <title>9a28e84b - Keep an explicit stack of function and block scopes, each element of</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp#9a28e84b</link>
        <description>Keep an explicit stack of function and block scopes, each element ofwhich has the label map, switch statement stack, etc. Previously, wehad a single set of maps in Sema (for the function) along with a stackof block scopes. However, this lead to funky behavior with nestedfunctions, e.g., in the member functions of local classes.The explicit-stack approach is far cleaner, and we retain a 1-elementcache so that we&apos;re not malloc/free&apos;ing every time we enter afunction. Fixes PR6382.Also, tweaked the unused-variable warning suppression logic to look aterrors within a given Scope rather than within a given function. Theprior code wasn&apos;t looking at the right number-of-errors count whendealing with blocks, since the block&apos;s count would be deallocatedbefore we got to ActOnPopScope. This approach works with nestedblocks/functions, and gives tighter error recovery.llvm-svn: 97518

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/local-classes.cpp</description>
        <pubDate>Mon, 01 Mar 2010 23:15:13 +0000</pubDate>
        <dc:creator>Douglas Gregor &lt;dgregor@apple.com&gt;</dc:creator>
    </item>
</channel>
</rss>
