     ;; against, can't use cr-flymake-chromium-src here.  Instead we add a
     ;; generic regexp, but only to a buffer-local version of the variable.
     (set (make-local-variable 'flymake-allowed-file-name-masks)
-         (list (list (concat "\\." (make-regexp '("c" "cc" "cpp")) "$")
+         (list (list "\\.c\\(\\|c\\|pp\\)"
                      'cr-flymake-ninja-command-line
-                     nil
+                     'ignore
                      'cr-flymake-getfname)))
     (flymake-find-file-hook)
     (if flymake-mode

  "Return chromium's src/ directory, or nil on failure."
  (locate-dominating-file buffer-file-truename cr-flymake-ninja-build-file))

(defun cr-flymake-current-file-name ()
  "Return the relative path from chromium's src/ directory to the
  file backing the current buffer or nil if it doesn't look like
  we're under chromium/src/."
  (when (and (cr-flymake-chromium-src)
             (string-prefix-p (cr-flymake-chromium-src) buffer-file-truename))
    (substring buffer-file-truename (length (cr-flymake-chromium-src)))))

(defun cr-flymake-from-build-to-src-root ()

   "[^/]+" ".."
   (substring
    (file-name-directory
     (file-truename (or (and (cr-flymake-string-prefix-p
                              "/" cr-flymake-ninja-build-file)
                             cr-flymake-ninja-build-file)
                        (concat (cr-flymake-chromium-src)
                                cr-flymake-ninja-build-file))))
