On 30/06/17 01:03, Evgenii Stepanov wrote:
This change broke clang/ubsan bot.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/6047/steps/check-clang%20ubsan/logs/stdio

It looks like the value you are initializing SavedAK with may itself be uninitialized? I see a few constructors that do not mention it.
Indeed. Do you have a solution in mind? The only way I see to fix this is by using an llvm::Optional.


On Thu, Jun 29, 2017 at 9:08 AM, Vassil Vassilev via cfe-commits <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote:

    Author: vvassilev
    Date: Thu Jun 29 09:08:10 2017
    New Revision: 306692

    URL: http://llvm.org/viewvc/llvm-project?rev=306692&view=rev
    <http://llvm.org/viewvc/llvm-project?rev=306692&view=rev>
    Log:
    Initialize variable and silence potentially uninitialized warning.

    Patch by Liza Sakellari!

    Modified:
        cfe/trunk/include/clang/Sema/Lookup.h

    Modified: cfe/trunk/include/clang/Sema/Lookup.h
    URL:
    
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Lookup.h?rev=306692&r1=306691&r2=306692&view=diff
    
<http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Lookup.h?rev=306692&r1=306691&r2=306692&view=diff>
    
==============================================================================
    --- cfe/trunk/include/clang/Sema/Lookup.h (original)
    +++ cfe/trunk/include/clang/Sema/Lookup.h Thu Jun 29 09:08:10 2017
    @@ -465,10 +465,9 @@ public:
             Paths = nullptr;
           }
         } else {
    -      AmbiguityKind SavedAK;
    +      AmbiguityKind SavedAK = Ambiguity;
           bool WasAmbiguous = false;
           if (ResultKind == Ambiguous) {
    -        SavedAK = Ambiguity;
             WasAmbiguous = true;
           }
           ResultKind = Found;


    _______________________________________________
    cfe-commits mailing list
    cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>
    http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
    <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits>



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to