Invalid Use Diagnostic

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Invalid Use Diagnostic

Kristof Beyls via cfe-dev
I'm currently working on asm goto with return values. For the first iteration, I want to limit the use of return values to the "normal" path. Therefore, I would like to issue a diagnostic if the use is in the "abnormal" path that doesn't first go through the "normal" code. I'm not very familiar with how clang determines such things. How can this be done?

-bw

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Invalid Use Diagnostic

Kristof Beyls via cfe-dev

By “diagnostic”, you mean a -Wuninitialized warning?  That’s generated by clang::runUninitializedVariablesAnalysis.

 

-Eli

 

From: cfe-dev <[hidden email]> On Behalf Of Bill Wendling via cfe-dev
Sent: Friday, September 27, 2019 1:42 PM
To: [hidden email] Developers <[hidden email]>
Subject: [EXT] [cfe-dev] Invalid Use Diagnostic

 

I'm currently working on asm goto with return values. For the first iteration, I want to limit the use of return values to the "normal" path. Therefore, I would like to issue a diagnostic if the use is in the "abnormal" path that doesn't first go through the "normal" code. I'm not very familiar with how clang determines such things. How can this be done?

 

-bw


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Invalid Use Diagnostic

Kristof Beyls via cfe-dev
That may do. Thanks!

On Fri, Sep 27, 2019 at 1:52 PM Eli Friedman <[hidden email]> wrote:

By “diagnostic”, you mean a -Wuninitialized warning?  That’s generated by clang::runUninitializedVariablesAnalysis.

 

-Eli

 

From: cfe-dev <[hidden email]> On Behalf Of Bill Wendling via cfe-dev
Sent: Friday, September 27, 2019 1:42 PM
To: [hidden email] Developers <[hidden email]>
Subject: [EXT] [cfe-dev] Invalid Use Diagnostic

 

I'm currently working on asm goto with return values. For the first iteration, I want to limit the use of return values to the "normal" path. Therefore, I would like to issue a diagnostic if the use is in the "abnormal" path that doesn't first go through the "normal" code. I'm not very familiar with how clang determines such things. How can this be done?

 

-bw


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev