Project

General

Profile

Feature #5506

cstyle: warn about #if enumerating ISA defines

Added by Josef Sipek over 5 years ago.

Status:
New
Priority:
Low
Assignee:
Category:
tools - gate/build tools
Start date:
2015-01-05
Due date:
% Done:

80%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

It is quite easy to blindly end up with code that looks like:

#if defined(__amd64) || defined(__i386)

even though there is a more concise way of performing the same check:

#ifdef __x86

cstyle should warn about #ifs that enumerate ISA defines when there is a better way.

Also available in: Atom PDF